reihenflge
This commit is contained in:
parent
c121b24da5
commit
7221b66af5
1 changed files with 12 additions and 9 deletions
21
app.sh
21
app.sh
|
@ -1,6 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
GIT_REPO_PATH=$(mktemp -d)
|
||||
|
||||
git config --global user.email "$GIT_USER_MAIL"
|
||||
git config --global user.name "$GIT_USERNAME"
|
||||
|
||||
echo "clone repository..."
|
||||
GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -i $GIT_REPO_DEPLOY_KEY" git clone "$GIT_REPO_URL" "$GIT_REPO_PATH" --quiet &> /dev/null
|
||||
cd "$GIT_REPO_PATH"
|
||||
|
||||
while true ; do
|
||||
echo "pull repository..."
|
||||
git pull --quiet &> /dev/null
|
||||
|
||||
echo "check variables..."
|
||||
if [ -z "$INTERVAL" ] ; then
|
||||
echo "INTERVAL is not set."
|
||||
|
@ -35,15 +47,6 @@ while true ; do
|
|||
exit 3
|
||||
fi
|
||||
|
||||
GIT_REPO_PATH=$(mktemp -d)
|
||||
|
||||
git config --global user.email "$GIT_USER_MAIL"
|
||||
git config --global user.name "$GIT_USERNAME"
|
||||
|
||||
echo "clone repository..."
|
||||
GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -i $GIT_REPO_DEPLOY_KEY" git clone "$GIT_REPO_URL" "$GIT_REPO_PATH" --quiet &> /dev/null
|
||||
cd "$GIT_REPO_PATH"
|
||||
|
||||
# Save the current value of IFS to restore later
|
||||
OLD_IFS=$IFS
|
||||
|
||||
|
|
Loading…
Reference in a new issue