How to get a map fast and easy on the server (Shellscript)

Forum for anything hard- or software related.

Moderator: Moderators

Post Reply
Haudrauf
tripped on its own grenade
Posts: 331
Joined: Tue Aug 26, 2003 11:20 am
Location: de
Contact:

How to get a map fast and easy on the server (Shellscript)

Post by Haudrauf »

Code: Select all

#!/bin/sh

#########

# this simple shellscript just gets the .zip from the server and

# puts the .bsp, which comes out of it (./maps/) to the current directory.

#

# Just put this script as for instance "getmap.sh" into your map-directory

# and try: ./getmap.sh cliff2

#

# Haudrauf of Quadaver - http://www.quadaver.de

# 

# This is where you get your maps from...

# Set this with trailing slash pls:

MAPSERVER=http://quad.netdome.biz/aq2/maps/

#########



# just the name of the zip

MAP2GET=$1

CWD=$PWD

MTEMP=$CWD/maptemp



function getMap {

  wget $MAPSERVER$MAP2GET.zip

}



function unzipMap {

  unzip $MAP2GET.zip

}



function copyBSP {

  cd maps

  cp -u *bsp $CWD

}



function makeTemp {

  mkdir $MTEMP

  cd $MTEMP

}

function killTemp {

  cd $CWD

  rm -rf $MTEMP

}



function main {

  makeTemp

  getMap

  unzipMap

  copyBSP

  killTemp

}



main


Use at your own risk.. So, if something explodes, it's not my fault - as always. :santa:
Den
something dur dur
Posts: 2616
Joined: Fri Jul 25, 2003 8:56 am
Location: nl
Contact:

Post by Den »

IBA explodes! your fault haui!
There's a chopper coming in 3 days and there's a katana on top of the cafe and that's all you need to know
Image
Beavisss
loses a vital chest organ
Posts: 531
Joined: Sun Jan 04, 2004 5:27 pm
Location: ru
Contact:

Post by Beavisss »

Faster to download maps there http://www.lahtela.com/aq2suomi/maps/
Image
Haudrauf
tripped on its own grenade
Posts: 331
Joined: Tue Aug 26, 2003 11:20 am
Location: de
Contact:

Post by Haudrauf »

Beaviss: read the readme on the server above :)...



edit: Well ok, it's not clear: The server (http://quad.netdome.biz/aq2/maps) may not be the fastest (for scandinavian people), but it's (perhaps) the most complete aq2 map server on the net.
ImageOwner of http://aq2maps.quadaver.org
Not part of #aq2admins for a reason.
hebereque
is connecting
Posts: 11
Joined: Wed Jan 21, 2004 8:32 am
Location: fi
Contact:

Post by hebereque »

Please use both. Map downloads cause lots of traffic.
HEbereQue^cSu - AQ2Suomi.com creator - www.lahtela.com
Sovnig
blew itself up
Posts: 364
Joined: Wed Nov 26, 2003 3:46 am
Location: dk

Post by Sovnig »

Yeah, please download each map twice to avoid traffics :bday:
Post Reply