Announcement

Collapse
No announcement yet.

Linux script to zip all files (map download)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linux script to zip all files (map download)

    Does anyone have a Linux script to zip all files in directory 1 into individual files zip files in directory 2. (even better if it only did it where file #2 doesn't already exist and it could be made a cron job or a "sync.php" page could run the sync)?

    maps/aerowalk.bsp -> maps/compressed/aerowalk.zip
    maps/arenax.bsp -> maps/compressed/arenax.zip
    maps/ctf8.bsp -> maps/compressed/ctf8.zip
    maps/ikspq1.bsp -> maps/compressed/ikspq1.zip
    maps/q1edge.bsp -> maps/compressed/q1edge.zip
    This relates to http map download.

    I'd like to figure out 1 single universal place for http map downloads and uncompressed .bsp files is just such a waste.

    Qrack's curl based map download seems very solid. I'd like to see the long term "standard" involving compression, but it needs to be very easy to maintain.

    Then let every server operator have access to it. Or, if a single location is unworkable, modify ProQuake server to send sv_download_url "http://www.myserver.com/maps" and have it first check for a .zip file and if that fails, check for a .bsp file.
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

  • #2
    I really despise the distribution of maps without their readmes (well, actually, outside their original zips/mods/paks/distribution).
    But on the other hand I support making Quake easier to the "end-consumer" so here is a hint: Curl supports gzip compression on-the-fly. Maybe you could use that.

    I am a hypocrite! ;-)

    Oh, this is my default "do something with all files" loop:

    Code:
    find . -maxdepth 1 -name "*.ext" > filelistfile
    
    while read thisismyvariable ; do
    		#do something (use ${thisismyvariable})
    done < filelistfile
    Last edited by Spirit; 11-15-2008, 08:07 AM.
    Quake 1 Singleplayer Maps and Mods

    Comment


    • #3
      Thanks!

      Yeah, I care about readmes and eventually I'll try to address that.
      Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

      So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

      Comment

      Working...
      X