From 9c8a6ea3132f3d1dfa8f25a68f75a3c221f15b0e Mon Sep 17 00:00:00 2001 From: Saivann Date: Sun, 18 May 2014 11:47:09 -0400 Subject: [PATCH] Drop outdated/unused scripts --- _contrib/build_website.sh | 35 ------------------------------- _contrib/update_website.sh | 43 -------------------------------------- 2 files changed, 78 deletions(-) delete mode 100755 _contrib/build_website.sh delete mode 100755 _contrib/update_website.sh diff --git a/_contrib/build_website.sh b/_contrib/build_website.sh deleted file mode 100755 index 6748e50b..00000000 --- a/_contrib/build_website.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -REPO='https://github.com/bitcoin/bitcoin.org.git' -WORKDIR='/bitcoin.org' -DESTDIR='/var/www/bitcoinorg' - -# Stop script in case a single command fails -set -e - -export PATH=/var/lib/gems/1.8/bin/:$PATH - -# Clone repository if missing -if [ ! -d $WORKDIR ]; then - git clone $REPO $WORKDIR - cd $WORKDIR - git reset --hard HEAD~1 -fi - -cd $WORKDIR - -# Exit if no new commit is available -git fetch -a -LASTLOCALCOMMIT=`git log --format="%H" | head -n1` -LASTREMOTECOMMIT=`git log origin/master --format="%H" | head -n1` -if [ $LASTLOCALCOMMIT == $LASTREMOTECOMMIT ]; then - exit -fi - -# Update local branch -git reset --hard origin/master -git clean -x -f -d - -# Build website -jekyll -rsync --exclude /bin/ --delete -a $WORKDIR/_site/ $DESTDIR/ diff --git a/_contrib/update_website.sh b/_contrib/update_website.sh deleted file mode 100755 index bfeb390d..00000000 --- a/_contrib/update_website.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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` - -# Stop script in case a single command fails -set -e - -# Cleanup on EXIT (even when a command fails) -trap "rm -rf $WORKDIR $DESTDIR; exit 1" EXIT - -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 -