Created
January 15, 2011 05:29
-
-
Save tnoborio/780719 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 "`dirname $0`/../" | |
lein compile | |
git archive --format=tar --prefix=hogehoge/ HEAD | gzip > ../hogehoge.tar.gz | |
scp -l 800 ../hogehoge.tar.gz server:/tmp/ | |
ssh server "cd /usr/local; tar zxf /tmp/hogehoge.tar.gz" | |
echo "released" |
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 "`dirname $0`/../" | |
if [ `pwd` != "/usr/local/hogehoge" ]; then | |
echo "no hogehoge directory." | |
exit 1 | |
fi | |
read -p "development server restart? (y/n)?" | |
[ "$REPLY" = "y" ] || exit 1 | |
ps axu | grep -P "java.+leiningen.+\/usr\/local\/hogehoge\/" | awk '{ print $2 }' | xargs kill | |
nohup lein run & | |
echo "reload" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment