add script update_website.sh to automatically pull, run jekyll and rsync to webserver

This commit is contained in:
Nils Schneider 2011-09-15 12:11:13 +02:00
parent 613610632e
commit c2e697f166

View file

@ -0,0 +1,24 @@
#!/bin/bash
REPO=git://github.com/bitcoin/bitcoin.org.git
WORKDIR=/tmp/bitcoin.org/
DESTDIR=/var/www/
JEKYLL=/var/lib/gems/1.8/bin/jekyll
if test ! -d $WORKDIR; then
git clone $REPO $WORKDIR
fi
cd $WORKDIR
git pull origin master
git reset --hard
git clean -x -f
$JEKYLL
rsync --delete -a $WORKDIR/_site/ $DESTDIR