aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <info@minifree.org>2017-04-05 16:03:28 +0100
committerLeah Rowe <info@minifree.org>2017-04-05 16:04:26 +0100
commitd0d00942fc74c598b1ba2a0ec86947472657f69b (patch)
treebd2036aea9e28792b73ac8e8cb2f2a2fb7624d90
parent0e51b49dbd742730f8e9082503d1f547baff6fd1 (diff)
downloadlibrebootfr-d0d00942fc74c598b1ba2a0ec86947472657f69b.tar.gz
librebootfr-d0d00942fc74c598b1ba2a0ec86947472657f69b.zip
publish.sh: remove test cases; remove check on unbound variables (TODO: fix)
Alyssa, you need to make sure that variables are always bound.
-rwxr-xr-xwww/generate.sh2
-rwxr-xr-xwww/publish.sh7
2 files changed, 4 insertions, 5 deletions
diff --git a/www/generate.sh b/www/generate.sh
index 8e2f5549..21610a2f 100755
--- a/www/generate.sh
+++ b/www/generate.sh
@@ -1,7 +1,7 @@
#!/bin/bash
[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
+set -e
find -L . -name '*.html' -and -not -name 'template.html' -delete
find -L . -name '*.md' -exec ./publish.sh {} \;
diff --git a/www/publish.sh b/www/publish.sh
index 081b0bab..5e89dcb1 100755
--- a/www/publish.sh
+++ b/www/publish.sh
@@ -1,6 +1,7 @@
#!/bin/bash
#
-# Copyright (C) 2017 Alyssa Rosenzweig <alyssa@rosenzweig.io
+# Copyright (C) 2017 Alyssa Rosenzweig <alyssa@rosenzweig.io>
+# Copyright (C) 2017 Leah Rowe <info@minifree.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
+set -e
echo $1
FILE=${1%.md}
@@ -42,11 +43,9 @@ sed temp.md -i -e 's/\.md\(#[a-z\-]*\)*)/.html\1)/g'
# work around issue #2872
TOC=$(grep -q "^x-toc-enable: true$" temp.md && echo "--toc --toc-depth=2") || TOC=""
-echo $TOC
# work around heterogenous pandoc versions
SMART=$(pandoc -v | grep -q '2\.0' || echo "--smart") || SMART=""
-echo $SMART
# chuck through pandoc
pandoc $TOC $SMART temp.md -s --css /global.css -T Libreboot \