diff --git a/contrib/extractor_scripts/ExtractResources.sh b/contrib/extractor_scripts/ExtractResources.sh index dcc17997a1..2f6a29d7c3 100755 --- a/contrib/extractor_scripts/ExtractResources.sh +++ b/contrib/extractor_scripts/ExtractResources.sh @@ -144,8 +144,8 @@ then echo "How many CPU threads should be used for extracting mmaps? (leave empty to use all available threads)" read line echo - if [[ ! -z $line ]]; then - if [[ $line =~ ^[1-9+]$ ]]; then + if [ ! -z "$line" ]; then + if [ $(expr "$line" : "^[1-9][0-9]*$") -gt 0 ]; then NUM_THREAD=$line else echo "Only numbers are allowed!" @@ -252,11 +252,6 @@ if [ "$USE_VMAPS" = "1" ] then echo "$(date): Start extraction of vmaps..." | tee -a $LOG_FILE $PREFIX/vmap_extractor $VMAP_RES $VMAP_OPT_RES | tee -a $DETAIL_LOG_FILE - exit_code="${PIPESTATUS[0]}" - if [[ "$exit_code" -ne "0" ]]; then - echo "$(date): Extraction of vmaps failed with errors. Aborting extraction. See the log file for more details." - exit "$exit_code" - fi echo "$(date): Extracting of vmaps finished" | tee -a $LOG_FILE if [ ! -d "$(pwd)/vmaps" ] then @@ -264,11 +259,6 @@ then fi echo "$(date): Start assembling of vmaps..." | tee -a $LOG_FILE $PREFIX/vmap_assembler ${OUTPUT_PATH:-.}/Buildings ${OUTPUT_PATH:-.}/vmaps | tee -a $DETAIL_LOG_FILE - exit_code="${PIPESTATUS[0]}" - if [[ "$exit_code" -ne "0" ]]; then - echo "$(date): Assembling of vmaps failed with errors. Aborting extraction. See the log file for more details." - exit "$exit_code" - fi echo "$(date): Assembling of vmaps finished" | tee -a $LOG_FILE echo | tee -a $LOG_FILE