Skip to content

Commit

Permalink
proper way to exit script run.sh when lock file exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Dec 12, 2018
1 parent 78c477e commit b299eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
export BATCH=$(date +%s)

# exit if already running, check lock file
if [[ -f ./run.lock ]]; then (echo "# Benchmark run $BATCH discarded due to previous run $(cat run.lock) still running" && exit); else echo $BATCH > run.lock; fi;
if [[ -f ./run.lock ]]; then echo "# Benchmark run $BATCH discarded due to previous run $(cat run.lock) still running" && exit; else echo $BATCH > run.lock; fi;

# get config
source run.conf
Expand Down

0 comments on commit b299eaa

Please sign in to comment.