updated script

This commit is contained in:
konrad 2017-04-28 17:55:38 +02:00
parent e6d8a55d25
commit edf1f27af3
1 changed files with 8 additions and 9 deletions

View File

@ -10,6 +10,14 @@ while getopts ':k:g:d:c:' OPTION ; do
esac
done
echo "-----------------------------"
echo "Started at:"
date
echo "Key: ${KEY}"
echo "Git-Url: ${GIT_URL}"
echo "Deploy-Dir: ${DEPLOY_DIR}"
echo "----------------------------"
#Check for Key
if [ -z "$KEY" ]
then
@ -31,15 +39,6 @@ if [ -z "$DEPLOY_DIR" ]
exit 1
fi
echo "-----------------------------"
echo "Started at:"
date
echo "Key: ${KEY}"
echo "Git-Url: ${GIT_URL}"
echo "Deploy-Dir: ${DEPLOY_DIR}"
#echo "ssh-agent bash -c 'ssh-add ${KEY}; git clone ${GIT_URL} /tmp/git-deploy'"
echo "----------------------------"
#mkdir ${DEPLOY_DIR}_dep
rm -Rf /tmp/git-deploy
ssh-agent bash -c "ssh-add ${KEY}; git clone ${GIT_URL} /tmp/git-deploy"