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
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