aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Reed <michael@michaelreed.io>2017-07-13 01:36:27 -0400
committerMichael Reed <michael@michaelreed.io>2017-07-13 01:36:53 -0400
commita8d89665de6da20a8793886e03f153e922f6e519 (patch)
tree40df28854a3fb4f523abc1cf0c6853287bdfa883
parent8c7d21cbf45a4279dcffae95ce626a0dc9006a30 (diff)
downloadlibrebootfr-a8d89665de6da20a8793886e03f153e922f6e519.tar.gz
librebootfr-a8d89665de6da20a8793886e03f153e922f6e519.zip
www/publish.sh: Clean up shellcheck warnings
All of the warnings were of type SC2086 [1]: Double quote to prevent globbing and word splitting. [1]: https://github.com/koalaman/shellcheck/wiki/Sc2086
-rwxr-xr-xwww/publish.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/www/publish.sh b/www/publish.sh
index 9c3a4fcd..8e25d920 100755
--- a/www/publish.sh
+++ b/www/publish.sh
@@ -70,14 +70,14 @@ TOC=$(grep -q "^x-toc-enable: true$" "$TMPFILE" && printf '%s\n' "--toc --toc-de
SMART=$(pandoc -v | grep -q '2\.0' || printf '%s\n' "--smart") || SMART=""
# chuck through pandoc
-pandoc $TOC $SMART "$TMPFILE" -s --css /global.css $OPTS \
- --template template.html --metadata return="$RETURN"> $FILE.html
+pandoc $TOC $SMART "$TMPFILE" -s --css /global.css "$OPTS" \
+ --template template.html --metadata return="$RETURN" > "$FILE.html"
# additionally, produce bare file for RSS
-pandoc $1 > $FILE.bare.html
+pandoc "$1" > "$FILE.bare.html"
# generate section title anchors as [link]
-sed -i -e 's_^<h\([123]\) id="\(.*\)">\(.*\)</h\1>_<div class="h"><h\1 id="\2">\3</h\1><a aria-hidden="true" href="#\2">[link]</a></div>_' $FILE.html
+sed -i -e 's_^<h\([123]\) id="\(.*\)">\(.*\)</h\1>_<div class="h"><h\1 id="\2">\3</h\1><a aria-hidden="true" href="#\2">[link]</a></div>_' "$FILE.html"
# clean up temporary file
rm -f "$TMPFILE"