Replace ~ with $HOME

This commit is contained in:
Ilya Zverev 2015-04-29 13:23:34 +03:00 committed by Alex Zolotarev
parent 104658ad7a
commit a5b881d242
3 changed files with 6 additions and 6 deletions

View file

@ -95,7 +95,7 @@ elif [ "$MODE" == "routing" ]; then
OSRM="$INTDIR/tmp.osrm"
export STXXLCFG=~/.stxxl
# just a guess
OSMCONVERT="${OSMCONVERT:-~/osmctools/osmconvert}"
OSMCONVERT="${OSMCONVERT:-$HOME/osmctools/osmconvert}"
if [ ! -x "$OSMCONVERT" ]; then
OSMCONVERT="$INTDIR/osmconvert"
wget -O - http://m.m.i24.cc/osmconvert.c | cc -x c - -lz -O3 -o $OSMCONVERT

View file

@ -91,7 +91,7 @@ set -u # Fail on undefined variables
set -x # Echo every script line
# Initialize everything. For variables with X="${X:-...}" you can override a default value
PLANET="${PLANET:-~/planet/planet-latest.o5m}"
PLANET="${PLANET:-$HOME/planet/planet-latest.o5m}"
[ ! -r "$PLANET" -a -z "$OPT_DOWNLOAD" ] && fail "Please put planet file into $PLANET, use -U, or specify correct PLANET variable"
OMIM_PATH="${OMIM_PATH:-$(cd "$(dirname "$0")/../.."; pwd)}"
DATA_PATH="$OMIM_PATH/data"
@ -99,7 +99,7 @@ DATA_PATH="$OMIM_PATH/data"
TARGET="${TARGET:-$DATA_PATH}"
mkdir -p "$TARGET"
INTDIR="${INTDIR:-$TARGET/intermediate_data}"
OSMCTOOLS="${OSMCTOOLS:-~/osmctools}"
OSMCTOOLS="${OSMCTOOLS:-$HOME/osmctools}"
[ ! -d "$OSMCTOOLS" ] && OSMCTOOLS="$INTDIR"
MERGE_COASTS_DELAY=2400 # in seconds
# set to "mem" if there is more than 64 GB of memory

View file

@ -25,11 +25,11 @@ OSRM_FLAG="${OSRM_FLAG:-$INTDIR/osrm_done}"
if [ "$1" == "prepare" ]; then
rm -f "$OSRM_FLAG"
PLANET="${PLANET:-~/planet/planet-latest.o5m}"
PLANET="${PLANET:-$HOME/planet/planet-latest.o5m}"
OSRM_PATH="${OSRM_PATH:-$OMIM_PATH/3party/osrm/osrm-backend}"
OSRM_BUILD_PATH="${OSRM_BUILD_PATH:-$OSRM_PATH/build}"
[ ! -x "$OSRM_BUILD_PATH/osrm-extract" ] && fail "Please compile OSRM binaries to $OSRM_BUILD_PATH"
OSMCTOOLS="${OSMCTOOLS:-~/osmctools}"
OSMCTOOLS="${OSMCTOOLS:-$HOME/osmctools}"
[ ! -d "$OSMCTOOLS" ] && OSMCTOOLS="$INTDIR"
[ ! -x "$OSMCTOOLS/osmconvert" ] && wget -q -O - http://m.m.i24.cc/osmconvert.c | cc -x c - -lz -O3 -o "$OSMCTOOLS/osmconvert"
@ -46,7 +46,7 @@ if [ "$1" == "prepare" ]; then
REGIONS=${REGIONS:-$(ls $BORDERS_PATH/*.poly | xargs -I % basename % .poly)}
[ -z "$REGIONS" ] && fail "No regions to create routing files for"
echo "$REGIONS" | xargs -P $NUM_PROCESSES -I % "$OSMCTOOLS/osmconvert" $PLANET --hash-memory=2000 -B=$BORDERS_PATH/%.poly --complex-ways --out-pbf -o=$INTDIR/%.pbf &>~/split_planet_osmconvert.log
echo "$REGIONS" | xargs -P $NUM_PROCESSES -I % "$OSMCTOOLS/osmconvert" $PLANET --hash-memory=2000 -B=$BORDERS_PATH/%.poly --complex-ways --out-pbf -o=$INTDIR/%.pbf
export STXXLCFG=~/.stxxl
echo "$REGIONS" | while read REGION ; do