From 293b50b340b3558d0b760b3388ba2cb7f77e57bf Mon Sep 17 00:00:00 2001 From: RandumKiwi Date: Wed, 27 Mar 2013 21:04:38 +0000 Subject: [PATCH] Whoops, Linux tried to delete before it executed! git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7435 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/dev_tools/configfolder_script.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/dev_tools/configfolder_script.sh b/source/dev_tools/configfolder_script.sh index 3d77654d..c416b6bc 100644 --- a/source/dev_tools/configfolder_script.sh +++ b/source/dev_tools/configfolder_script.sh @@ -75,19 +75,13 @@ if [ "$ANSR" = "y" ] || [ "$ANSR" = "Y" ] || [ "$ANSR" = "yes" ] || [ "$ANSR" = MAPSLIST=`cd "$PATHTOACDIR" && find ./packages/maps/official/*.cgz | xargs -i basename {} .cgz | sort -u | sed 's/\n/ /g'` # Currently listed CTF maps: - CURCTFMAPS=`sed -n 's/const ctfmaps \[//p' menus.cfg | sed 's/\]//g'` + CURCTFMAPS="$(sed -n 's/const ctfmaps \[//p' menus.cfg | sed 's/\]//g')" # Replacement text for "const defaultmaps": DEFLTMAPS=`echo "const defaultmaps [" $MAPSLIST "]"` # Replacement text for the bot silders: BOTSLIDER=`echo 'menuitemslider [Map: ] 0 (- (listlen $defaultmaps) 1) "$survMap" 1 [' $MAPSLIST '] [ survMap = $arg1 ]'` - - # Replacement text for "const ctfmaps": - CTFMAPS=`echo "const ctfmaps [" $CTFLIST "]"` - - # List of CTF maps, with new additions: - CTFLIST=`echo " " "$CURCTFMAPS" " " "$NEWCTFMAPS" " " | sed "s/ /\n/g" | sed '/^$/d' | sort -u | sed "s/\n/ /g"` # List of non-CTF maps: NONCTFLIST=`echo " " "$CURCTFMAPS" " " "$MAPSLIST" " " | sed "s/ /\n/g" | sed '/^$/d' | sort | uniq -u` @@ -101,6 +95,12 @@ if [ "$ANSR" = "y" ] || [ "$ANSR" = "Y" ] || [ "$ANSR" = "yes" ] || [ "$ANSR" = if [ "$ANSR" = "y" ] || [ "$ANSR" = "Y" ] || [ "$ANSR" = "yes" ] || [ "$ANSR" = "YES" ]; then echo "Please type the names of maps to add to the CTF menu, seperated by spaces." read NEWCTFMAPS + + # List of CTF maps, with new additions: + CTFLIST="$(echo " " "$CURCTFMAPS" " " "$NEWCTFMAPS" " " | sed "s/ /\n/g" | sed '/^$/d' | sort -u | sed "s/\n/ /g")" + # Replacement text for "const ctfmaps": + CTFMAPS="$(echo "const ctfmaps [" $CTFLIST "]")" + sed -i 's/const ctfmaps..*/'"$CTFMAPS"'/g' menus.cfg echo -e "DONE.\n" else