diff --git a/git_helpers.sh b/git_helpers.sh index 5325222..a693e29 100755 --- a/git_helpers.sh +++ b/git_helpers.sh @@ -1,5 +1,8 @@ #!/bin/bash -set -x +# set -x + +GIT_SSL_NO_VERIFY=true + commit_before_pull="" save_commit_before_pull () { @@ -32,10 +35,24 @@ clone_customer_repository () { `git clone https://git.mimbach49.de/GerhardHoffmann/customer_281.git` fi } +# clone_customer_repository create_workspace () { `mkdir -p ./workspace` - if [ $? -eq 0 ]; then - clone_customer_repository - fi + return 0 } + +set -x +pull_customer_repository () { + cd ./workspace/customer_281 + if [ $? -ne 0 ]; then + return 1 + fi + if [ "$(git pull)" = "Already up to date." ]; then + cd - &>/dev/null + return 1 + fi + cd - &>/dev/null + return 0 +} +pull_customer_repository