mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
39 lines
652 B
Bash
39 lines
652 B
Bash
#!/bin/bash
|
|
|
|
REPO=git://github.com/bitcoin/bitcoin.org.git
|
|
DESTREPO=git@github.com:bitcoin/bitcoin.github.com.git
|
|
|
|
WORKDIR=`mktemp -d`
|
|
DESTDIR=`mktemp -d`
|
|
|
|
export PATH=/var/lib/gems/1.8/bin/:$PATH
|
|
|
|
git clone $REPO $WORKDIR
|
|
|
|
cd $WORKDIR
|
|
|
|
git pull origin master
|
|
git reset --hard
|
|
git clean -x -f -d
|
|
mkdir _site/
|
|
|
|
jekyll
|
|
|
|
git clone $DESTREPO $DESTDIR
|
|
|
|
COMMITMSG="jekyll build on `date -R` from `git log --oneline|head -n1`"
|
|
|
|
cd $DESTDIR
|
|
|
|
git pull origin master
|
|
git reset --hard
|
|
git clean -x -f -d
|
|
|
|
rsync --exclude=.git/ --delete -a $WORKDIR/_site/ $DESTDIR
|
|
|
|
git add .
|
|
git commit -a -m "$COMMITMSG"
|
|
git push origin master
|
|
|
|
rm -rf $WORKDIR $DESTDIR
|
|
|