[11939] Make binary_extracting scripts compatible to bourne shell. Thanks to nighoo for pointing

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Schmoozerd 2012-04-06 19:35:40 +02:00
parent 95ce0c927c
commit fe3f4a43ee
3 changed files with 18 additions and 18 deletions

View file

@ -27,7 +27,7 @@ USE_VMAPS="0"
USE_MMAPS="0" USE_MMAPS="0"
USE_MMAPS_OFFMESH="0" USE_MMAPS_OFFMESH="0"
if [ "$1" == "a" ] if [ "$1" = "a" ]
then then
## extract all ## extract all
USE_AD="1" USE_AD="1"
@ -39,7 +39,7 @@ else
echo "Welcome to helper script to extract required dataz for MaNGOS!" echo "Welcome to helper script to extract required dataz for MaNGOS!"
echo "Should all dataz (dbc, maps, vmaps and mmaps be extracted? (y/n)" echo "Should all dataz (dbc, maps, vmaps and mmaps be extracted? (y/n)"
read line read line
if [ "$line" == "y" ] if [ "$line" = "y" ]
then then
## extract all ## extract all
USE_AD="1" USE_AD="1"
@ -49,24 +49,24 @@ else
echo echo
echo "Should dbc and maps be extracted? (y/n)" echo "Should dbc and maps be extracted? (y/n)"
read line read line
if [ "$line" == "y" ]; then USE_AD="1"; fi if [ "$line" = "y" ]; then USE_AD="1"; fi
echo echo
echo "Should vmaps be extracted? (y/n)" echo "Should vmaps be extracted? (y/n)"
read line read line
if [ "$line" == "y" ]; then USE_VMAPS="1"; fi if [ "$line" = "y" ]; then USE_VMAPS="1"; fi
echo echo
echo "Should mmaps be extracted? (y/n)" echo "Should mmaps be extracted? (y/n)"
echo "WARNING! This will take several hours!" echo "WARNING! This will take several hours!"
read line read line
if [ "$line" == "y" ] if [ "$line" = "y" ]
then then
USE_MMAPS="1"; USE_MMAPS="1";
else else
echo "Only reextract offmesh tiles for mmaps?" echo "Only reextract offmesh tiles for mmaps?"
read line read line
if [ "$line" == "y" ] if [ "$line" = "y" ]
then then
USE_MMAPS_OFFMESH="1"; USE_MMAPS_OFFMESH="1";
fi fi
@ -75,7 +75,7 @@ else
fi fi
## Special case: Only reextract offmesh tiles ## Special case: Only reextract offmesh tiles
if [ "$USE_MMAPS_OFFMESH" == "1" ] if [ "$USE_MMAPS_OFFMESH" = "1" ]
then then
echo "Only extracting offmesh meshes" echo "Only extracting offmesh meshes"
MovemapGen.sh offmesh $LOG_FILE $DETAIL_LOG_FILE MovemapGen.sh offmesh $LOG_FILE $DETAIL_LOG_FILE
@ -83,7 +83,7 @@ then
fi fi
## Obtain numbe ob processes ## Obtain numbe ob processes
if [ "$USE_MMAPS" == "1" ] if [ "$USE_MMAPS" = "1" ]
then then
echo "How many CPUs should be used for extracting mmaps? (1-4)" echo "How many CPUs should be used for extracting mmaps? (1-4)"
read line read line
@ -107,19 +107,19 @@ fi
echo "`date`: Start extracting dataz for MaNGOS" | tee $LOG_FILE echo "`date`: Start extracting dataz for MaNGOS" | tee $LOG_FILE
## Handle log messages ## Handle log messages
if [ "$USE_AD" == "1" ]; if [ "$USE_AD" = "1" ];
then then
echo "DBC and map files will be extracted" | tee -a $LOG_FILE echo "DBC and map files will be extracted" | tee -a $LOG_FILE
else else
echo "DBC and map files won't be extracted!" | tee -a $LOG_FILE echo "DBC and map files won't be extracted!" | tee -a $LOG_FILE
fi fi
if [ "$USE_VMAPS" == "1" ] if [ "$USE_VMAPS" = "1" ]
then then
echo "Vmaps will be extracted" | tee -a $LOG_FILE echo "Vmaps will be extracted" | tee -a $LOG_FILE
else else
echo "Vmaps won't be extracted!" | tee -a $LOG_FILE echo "Vmaps won't be extracted!" | tee -a $LOG_FILE
fi fi
if [ "$USE_MMAPS" == "1" ] if [ "$USE_MMAPS" = "1" ]
then then
echo "Mmaps will be extracted with $NUM_CPU processes" | tee -a $LOG_FILE echo "Mmaps will be extracted with $NUM_CPU processes" | tee -a $LOG_FILE
else else
@ -131,7 +131,7 @@ echo "`date`: Start extracting dataz for MaNGOS, DBCs/maps $USE_AD, vmaps $USE_V
echo | tee -a $DETAIL_LOG_FILE echo | tee -a $DETAIL_LOG_FILE
## Extract dbcs and maps ## Extract dbcs and maps
if [ "$USE_AD" == "1" ] if [ "$USE_AD" = "1" ]
then then
echo "`date`: Start extraction of DBCs and map files..." | tee -a $LOG_FILE echo "`date`: Start extraction of DBCs and map files..." | tee -a $LOG_FILE
ad | tee -a $DETAIL_LOG_FILE ad | tee -a $DETAIL_LOG_FILE
@ -141,7 +141,7 @@ then
fi fi
## Extract vmaps ## Extract vmaps
if [ "$USE_VMAPS" == "1" ] if [ "$USE_VMAPS" = "1" ]
then then
echo "`date`: Start extraction of vmaps..." | tee -a $LOG_FILE echo "`date`: Start extraction of vmaps..." | tee -a $LOG_FILE
vmapExtractor3 | tee -a $DETAIL_LOG_FILE vmapExtractor3 | tee -a $DETAIL_LOG_FILE
@ -156,7 +156,7 @@ then
fi fi
## Extract mmaps ## Extract mmaps
if [ "$USE_MMAPS" == "1" ] if [ "$USE_MMAPS" = "1" ]
then then
MovemapGen.sh $NUM_CPU $LOG_FILE $DETAIL_LOG_FILE MovemapGen.sh $NUM_CPU $LOG_FILE $DETAIL_LOG_FILE
fi fi

View file

@ -54,11 +54,11 @@ badParam()
echo echo
} }
if [ "$#" == "3" ] if [ "$#" = "3" ]
then then
LOG_FILE=$2 LOG_FILE=$2
DETAIL_LOG_FILE=$3 DETAIL_LOG_FILE=$3
elif [ "$#" == "2" ] elif [ "$#" = "2" ]
then then
LOG_FILE=$2 LOG_FILE=$2
fi fi
@ -84,7 +84,7 @@ createMMaps()
do do
for j in $EXCLUDE_MAPS for j in $EXCLUDE_MAPS
do do
if [ "$i" == "$j" ] if [ "$i" = "$j" ]
then then
continue 2 continue 2
fi fi

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11938" #define REVISION_NR "11939"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__