Skip to content

Instantly share code, notes, and snippets.

@tnoborio
Created January 15, 2011 05:29
Show Gist options
  • Save tnoborio/780719 to your computer and use it in GitHub Desktop.
Save tnoborio/780719 to your computer and use it in GitHub Desktop.
#!/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"
#!/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