diff --git a/docker_test.sh b/docker_test.sh index bcb97376be6aaad272544692d32d571c915c9029..f4ca21b0b1d149578c4295eca2302f7b15f5fdc6 100755 --- a/docker_test.sh +++ b/docker_test.sh @@ -59,20 +59,18 @@ read ans if [ $ans == "y" ]; then git pull - git checkout -- $1 + if [[ ! -d "$1" ]]; then + echo "ERROR : directory does not exist ($1)" + usage + exit 1 + fi + cd "$1" + git checkout -- . else echo "Aborting." exit 0 fi -if [[ ! -d "$1" ]]; then - echo "ERROR : directory does not exist ($1)" - usage - exit 1 -fi - -cd "$1" - create_dumb_secrets echo -e "\n==== Remove and re-create named external volumes ===="