Skip to content

Instantly share code, notes, and snippets.

@nodesocket
Created January 12, 2015 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nodesocket/a2358fb26b1a07b9ab01 to your computer and use it in GitHub Desktop.
Save nodesocket/a2358fb26b1a07b9ab01 to your computer and use it in GitHub Desktop.
BASE_PATH="/var/www/vhosts/my.photocloudapp.com"
REPO_PATH="/var/www/vhosts/my.photocloudapp.com/webapp"
GIT_URL="https://github.com/photocloud/webapp.git"
if [ -d "$REPO_PATH" ]; then
cd $REPO_PATH
git pull --quiet
echo "git pull successfully ran";
else
cd $BASE_PATH
git clone $GIT_URL --quiet
echo "git clone successfully ran"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment