Add pull_customer_directory

This commit is contained in:
Gerhard Hoffmann 2022-06-02 16:00:07 +02:00
parent 94a260b552
commit cff6d63c51

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
set -x # set -x
GIT_SSL_NO_VERIFY=true
commit_before_pull="" commit_before_pull=""
save_commit_before_pull () { save_commit_before_pull () {
@ -32,10 +35,24 @@ clone_customer_repository () {
`git clone https://git.mimbach49.de/GerhardHoffmann/customer_281.git` `git clone https://git.mimbach49.de/GerhardHoffmann/customer_281.git`
fi fi
} }
# clone_customer_repository
create_workspace () { create_workspace () {
`mkdir -p ./workspace` `mkdir -p ./workspace`
if [ $? -eq 0 ]; then return 0
clone_customer_repository
fi
} }
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