summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cole <dave@developmentseed.org>2013-05-30 16:45:37 -0400
committerDave Cole <dave@developmentseed.org>2013-05-30 16:45:37 -0400
commit49f91efad6d6cb168a6c7314454aea1f533a4f02 (patch)
tree4a76431b46e3b5fdab19d78e31dbdd72cade6734
parent49ac8bf6ff8e20592a625904daa67c8c01965ad6 (diff)
Add script for jekyll v1 building
-rw-r--r--scripts/build-v1.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/build-v1.sh b/scripts/build-v1.sh
new file mode 100644
index 0000000..0e85e39
--- /dev/null
+++ b/scripts/build-v1.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -e
+
+# This script is meant to be run automatically
+# as part of the jekyll-hook application.
+# https://github.com/developmentseed/jekyll-hook
+
+repo=$1
+branch=$2
+owner=$3
+giturl=$4
+source=$5
+build=$6
+
+# Check to see if repo exists. If not, git clone it
+if [ ! -d $source ]; then
+ git clone $giturl $source
+fi
+
+# Git checkout appropriate branch, pull latest code
+cd $source
+git checkout $branch
+git pull origin $branch
+cd -
+
+# Run jekyll
+cd $source
+jekyll build --source $source --destination $build
+cd -