Last active
August 29, 2015 14:10
-
-
Save jacks205/25f98c72db4b8b6be6b9 to your computer and use it in GitHub Desktop.
Schedules update server script
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 | |
if [ $# -ge 2 ] | |
then | |
bash ~/launch.sh -k | |
if [ "$2" == "-f" ] | |
then | |
rm -r $1/ | |
git clone https://github.com/jacks205/$1.git | |
cd ~/$1 && npm install | |
cp ~/local.js ~/$1/config/ | |
fi | |
if [ "$2" == "-p" ] | |
then | |
cd ~/$1 | |
git pull origin master | |
fi | |
bash ~/launch.sh | |
else | |
echo " update help" | |
echo " Make sure first parameter is name of git repo. i.e. schedules-backend" | |
echo " No argument default to server restart" | |
echo " Arguments" | |
echo " -f : Full update with new clone and npm install" | |
echo " -p : Partial update that pulls changes, May result in merge conflict" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment