How to get a map fast and easy on the server (Shellscript)
Posted: Wed Jan 21, 2004 2:48 pm
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.