make code cleaner

This commit is contained in:
Christoph Schranz 2020-03-11 08:07:03 +01:00
parent 46bc7c47ef
commit 676da22290

View File

@ -23,8 +23,8 @@ if [[ "$HEAD_COMMIT" == "latest" ]]; then
cd $STACKS_DIR && git pull && cd - cd $STACKS_DIR && git pull && cd -
else else
export GOT_HEAD="false" export GOT_HEAD="false"
cd $STACKS_DIR && git reset --hard $HEAD_COMMIT > /dev/null 2>&1 && cd - && export GOT_HEAD="true" cd $STACKS_DIR && git reset --hard "$HEAD_COMMIT" > /dev/null 2>&1 && cd - && export GOT_HEAD="true"
echo $HEAD echo "$HEAD"
if [[ "$GOT_HEAD" == "false" ]]; then if [[ "$GOT_HEAD" == "false" ]]; then
echo "Given sha-commit is invalid." 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)." echo "Usage: $0 -c [sha-commit] # set the head commit of the docker-stacks submodule (https://github.com/jupyter/docker-stacks/commits/master)."