start.sh: use native Windows paths on Mingw

This commit is contained in:
Ștefan Talpalaru 2019-02-27 03:21:47 +01:00 committed by zah
parent 5b60c3b45f
commit 8f64ab6add
1 changed files with 7 additions and 2 deletions

View File

@ -12,14 +12,19 @@ trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
NUMBER_OF_VALIDATORS=99 NUMBER_OF_VALIDATORS=99
cd $(dirname "$0") cd $(dirname "$0")
SIMULATION_DIR=$PWD/data
PWD_CMD="pwd"
# get native Windows paths on Mingw
uname | grep -qi mingw && PWD_CMD="pwd -W"
SIMULATION_DIR="$($PWD_CMD)/data"
mkdir -p "$SIMULATION_DIR" mkdir -p "$SIMULATION_DIR"
STARTUP_FILE="$SIMULATION_DIR/startup.json" STARTUP_FILE="$SIMULATION_DIR/startup.json"
SNAPSHOT_FILE="$SIMULATION_DIR/state_snapshot.json" SNAPSHOT_FILE="$SIMULATION_DIR/state_snapshot.json"
cd $(git rev-parse --show-toplevel) cd $(git rev-parse --show-toplevel)
ROOT_DIR=$PWD ROOT_DIR="$($PWD_CMD)"
mkdir -p $BUILD_OUTPUTS_DIR mkdir -p $BUILD_OUTPUTS_DIR