shuffle-oa-maps 530 Bytes
Newer Older
hightime's avatar
hightime committed
1 2
#!/bin/bash

hightime's avatar
hightime committed
3 4
hightime=${hightime:-/root/hightime}
. $hightime/functions
hightime's avatar
hightime committed
5

hightime's avatar
hightime committed
6
oaGame="$1"
hightime's avatar
hightime committed
7

hightime's avatar
hightime committed
8
if [[ $oaGame != oaffa && $oaGame != oagib ]] ; then
hightime's avatar
hightime committed
9
    echo 'shuffle-oa-maps [ oaffa | oagib ]'
hightime's avatar
hightime committed
10 11 12 13
    exit 1
fi

cd /home/$oaGame
hightime's avatar
hightime committed
14
if [[ $? != 0 ]] ; then
hightime's avatar
hightime committed
15 16 17
    echo $oaGame not installed, aborting
    exit 1
fi
hightime's avatar
hightime committed
18 19

cp -v $hightime/games/$oaGame/$oaGame-map-list $oaBaseoaDir
hightime's avatar
hightime committed
20
cd $oaBaseoaDir
hightime's avatar
hightime committed
21 22
. $hightime/reorder-maps $oaGame-map-list

hightime's avatar
hightime committed
23 24 25
echo fixing permissions...
chown -R $oaGame /home/$oaGame/$oaBaseoaDir
chgrp -R $oaGame /home/$oaGame/$oaBaseoaDir