[scripts] KEEP_DIR not remove intermediate when exists

This commit is contained in:
Lev Dragunov 2015-06-18 17:39:29 +03:00 committed by Alex Zolotarev
parent fb3fb59a50
commit 59421d8847
2 changed files with 4 additions and 4 deletions

View file

@ -250,7 +250,7 @@ if [ "$MODE" == "coast" ]; then
done
# make a working copy of generated coastlines file
[ -n "$OPT_WORLD" ] && cp "$INTCOASTSDIR/WorldCoasts.mwm.tmp" "$INTDIR"
[ -n "$KEEP_INTDIR" ] && rm -r "$INTCOASTSDIR"
[ -z "$KEEP_INTDIR" ] && rm -r "$INTCOASTSDIR"
MODE=inter
fi
@ -388,5 +388,5 @@ fi
# Cleaning up temporary directories
rm "$STATUS_FILE" "$OSRM_FLAG"
mv "$TARGET"/*.mwm.osm2ft "$INTDIR"
[ -n "$KEEP_INTDIR" ] && rm -r "$INTDIR"
[ -z "$KEEP_INTDIR" ] && rm -r "$INTDIR"
log "STATUS" "Done"

View file

@ -83,7 +83,7 @@ elif [ "$1" == "prepare" ]; then
"$OSRM_BUILD_PATH/osrm-prepare" --config "$PREPARE_CFG" --profile "$PROFILE" "$OSRM_FILE" -r "$RESTRICTIONS_FILE"
"$OSRM_BUILD_PATH/osrm-mapsme" -i "$OSRM_FILE"
if [ -s "$OSRM_FILE" ]; then
[ -n "$KEEP_INTDIR" ] && rm -f "$PBF"
[ -z "$KEEP_INTDIR" ] && rm -f "$PBF"
ONE_OSRM_READY=1
else
echo "Failed to create $OSRM_FILE"
@ -149,7 +149,7 @@ elif [ "$1" == "online" ]; then
"$OSRM_BUILD_PATH/osrm-extract" --config "$EXTRACT_CFG" --profile "$PROFILE" "$PBF"
"$OSRM_BUILD_PATH/osrm-prepare" --config "$PREPARE_CFG" --profile "$PROFILE" "$OSRM_FILE" -r "$RESTRICTIONS_FILE"
if [ -s "$OSRM_FILE" ]; then
[ -n "$KEEP_INTDIR" ] && rm -f "$PBF"
[ -z "$KEEP_INTDIR" ] && rm -f "$PBF"
else
echo "Failed to create $OSRM_FILE"
fi