Files
jekyll/script/proof
AJ Acevedo b0fa2462a6 Updated the scripts shebang for portability
- Updated all of the sh and bash shebangs for consistency and portability.
- set -e to the test script for portability
Resolves #3857
2015-07-18 22:23:56 -04:00

35 lines
617 B
Bash
Executable File

#!/usr/bin/env bash
#
# Usage:
# script/proof
set -e
function msg {
printf "\e[0;37m==> $1\e[0m\n"
}
INGORE_HREFS=$(ruby -e 'puts %w{
Chrononaut
twitter.com
nearlyfreespeech.net
eduardoboucas.com
}.map{|h| "/#{h}/"}.join(",")')
SOURCE="site"
DESTINATION="_site"
export PROOF=true
export NOKOGIRI_USE_SYSTEM_LIBRARIES=true
# 1.
msg "Installing..."
bundle install -j8 > /dev/null || bundle install > /dev/null
# 2.
msg "Building..."
bundle exec jekyll build -s $SOURCE -d $DESTINATION --full-rebuild --trace
# 3.
msg "Proofing..."
time bundle exec htmlproof ./$DESTINATION --href-ignore $INGORE_HREFS