File: proof

package info (click to toggle)
jekyll 3.1.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,820 kB
  • ctags: 997
  • sloc: ruby: 10,045; sh: 145; xml: 59; makefile: 28
file content (34 lines) | stat: -rwxr-xr-x 602 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/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 --trace

# 3.
msg "Proofing..."
time bundle exec htmlproof ./$DESTINATION --href-ignore $INGORE_HREFS