From 676da222901b45396856b56a5e776dcba70b805a Mon Sep 17 00:00:00 2001 From: Christoph Schranz Date: Wed, 11 Mar 2020 08:07:03 +0100 Subject: [PATCH] make code cleaner --- generate_Dockerfile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate_Dockerfile.sh b/generate_Dockerfile.sh index e926faa..c1099ef 100755 --- a/generate_Dockerfile.sh +++ b/generate_Dockerfile.sh @@ -23,8 +23,8 @@ if [[ "$HEAD_COMMIT" == "latest" ]]; then cd $STACKS_DIR && git pull && cd - else export GOT_HEAD="false" - cd $STACKS_DIR && git reset --hard $HEAD_COMMIT > /dev/null 2>&1 && cd - && export GOT_HEAD="true" - echo $HEAD + cd $STACKS_DIR && git reset --hard "$HEAD_COMMIT" > /dev/null 2>&1 && cd - && export GOT_HEAD="true" + echo "$HEAD" if [[ "$GOT_HEAD" == "false" ]]; then echo "Given sha-commit is invalid." echo "Usage: $0 -c [sha-commit] # set the head commit of the docker-stacks submodule (https://github.com/jupyter/docker-stacks/commits/master)."