Skip to content

Instantly share code, notes, and snippets.

@barrucadu
Created February 16, 2015 23:56
Show Gist options
  • Save barrucadu/06c6de01ee9f94cec1fd to your computer and use it in GitHub Desktop.
Save barrucadu/06c6de01ee9f94cec1fd to your computer and use it in GitHub Desktop.
#!/bin/zsh
export PATH="/home/barrucadu/.cabal/bin:$PATH"
export LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8
export LC_CTYPE=en_GB.UTF-8
WEBDIR=/srv/http/barrucadu.co.uk/.build
export GIT_WORK_TREE=$WEBDIR
export GIT_DIR=`pwd`
git checkout -f
cd $WEBDIR
git submodule update --init --recursive
if [[ ! -e .cabal-sandbox ]]; then
echo "Building cabal sandbox..."
cabal sandbox init >/dev/null
cabal update >/dev/null
cabal configure >/dev/null
cabal install --only-dependencies >/dev/null
fi
echo "Building hakyll..."
cabal build >/dev/null
echo "Building website..."
cabal run build >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment