aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorAndrew Robbins <contact@andrewrobbins.info>2019-01-05 22:57:31 -0500
committerAndrew Robbins <contact@andrewrobbins.info>2019-01-05 23:00:14 -0500
commit919c74c8f8a252e82f0b9dcccc97ab8170733d9a (patch)
tree9fa7f945ee1a28dfd21b0073d4570feadb43407c /www
parented8b0376b890466f9ab553485f12a8b7a3b7c63c (diff)
downloadlibrebootfr-919c74c8f8a252e82f0b9dcccc97ab8170733d9a.tar.gz
librebootfr-919c74c8f8a252e82f0b9dcccc97ab8170733d9a.zip
Condense sed invocations in publish.sh
Diffstat (limited to 'www')
-rwxr-xr-xwww/publish.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/www/publish.sh b/www/publish.sh
index eb8df8c6..d2924a48 100755
--- a/www/publish.sh
+++ b/www/publish.sh
@@ -56,12 +56,7 @@ if [[ $FILE != "./docs/fdl-1.3" && $FILE != "docs/fdl-1.3" &&
fi
# change out .md -> .html
-sed -i -e 's/\.md\(#[a-zA-Z0-9_-]*\)\?)/.html\1)/g' "$TMPFILE"
-sed -i -e 's/\.md\(#[a-zA-Z0-9_-]*\)\?]/.html\1]/g' "$TMPFILE"
-
-# change out .md -> .html
-sed -i -e 's/\.md\(#[a-zA-Z0-9_-]*\)\?)/.html\1)/g' "$TMPFILE"
-sed -i -e 's/\.md\(#[a-zA-Z0-9_-]*\)\?]/.html\1]/g' "$TMPFILE"
+sed -i -e 's/\.md\(#[a-zA-Z0-9_-]*\)\?\([])]*\)/.html\1\2/g' "$TMPFILE"
# work around issue #2872
TOC=$(grep -q "^x-toc-enable: true$" "$TMPFILE" && printf '%s\n' "--toc --toc-depth=2") || TOC=""