mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
use temporary directories for building. avoids permission conflicts
This commit is contained in:
parent
e48a0a26e3
commit
72dea0c169
1 changed files with 8 additions and 9 deletions
|
@ -2,14 +2,13 @@
|
||||||
|
|
||||||
REPO=git://github.com/bitcoin/bitcoin.org.git
|
REPO=git://github.com/bitcoin/bitcoin.org.git
|
||||||
DESTREPO=git@github.com:bitcoin/bitcoin.github.com.git
|
DESTREPO=git@github.com:bitcoin/bitcoin.github.com.git
|
||||||
WORKDIR=/tmp/bitcoin.org/
|
|
||||||
DESTDIR=/var/www/
|
WORKDIR=`mktemp -d`
|
||||||
|
DESTDIR=`mktemp -d`
|
||||||
|
|
||||||
export PATH=/var/lib/gems/1.8/bin/:$PATH
|
export PATH=/var/lib/gems/1.8/bin/:$PATH
|
||||||
|
|
||||||
if test ! -d $WORKDIR; then
|
git clone $REPO $WORKDIR
|
||||||
git clone $REPO $WORKDIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $WORKDIR
|
cd $WORKDIR
|
||||||
|
|
||||||
|
@ -20,10 +19,7 @@ mkdir _site/
|
||||||
|
|
||||||
jekyll
|
jekyll
|
||||||
|
|
||||||
if test ! -d $DESTDIR/.git/; then
|
git clone $DESTREPO $DESTDIR
|
||||||
rm -r $DESTDIR/*
|
|
||||||
git clone $DESTREPO $DESTDIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
COMMITMSG="jekyll build on `date -R` from `git log --oneline|head -n1`"
|
COMMITMSG="jekyll build on `date -R` from `git log --oneline|head -n1`"
|
||||||
|
|
||||||
|
@ -38,3 +34,6 @@ rsync --exclude=.git/ --delete -a $WORKDIR/_site/ $DESTDIR
|
||||||
git add .
|
git add .
|
||||||
git commit -a -m "$COMMITMSG"
|
git commit -a -m "$COMMITMSG"
|
||||||
git push origin master
|
git push origin master
|
||||||
|
|
||||||
|
rm -rf $WORKDIR $DESTDIR
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue