Last active
March 2, 2016 21:07
-
-
Save psaunders88/54f1daf1f2cded0f51b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /var/www/ | |
PROJECT_DIR_NAME="DiTest" | |
TIME="`date +%Y%m%d%H%M%S`" | |
# save copy of old file somewhere | |
cp -R $PROJECT_DIR_NAME backups/$PROJECT_DIR_NAME-$TIME | |
# Remove existing folder | |
rm -R $PROJECT_DIR_NAME | |
# clone from master without git files | |
git --git-dir=/dev/null clone --depth=1 https://github.com/psaunders88/DiTest.git $PROJECT_DIR_NAME | |
rm -R $PROJECT_DIR_NAME/.git | |
# Composer update | |
cd $PROJECT_DIR_NAME | |
composer install | |
cd ../ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment