Fix builds when using BSD sed

This commit is contained in:
Robbie McMichael 2017-11-27 17:01:45 +11:00 committed by Colin Caine
parent e4b17c4eaa
commit 6f244162ab
2 changed files with 10 additions and 3 deletions

View file

@ -1,4 +1,6 @@
#!/usr/bin/env bash
shopt -s globstar
sed -i '/<\/body>/s@^@<script src="/content.js"></script><link rel="stylesheet" href="/static/content.css"><link rel="stylesheet" href="/static/hint.css">@' $1
sed -i.bak '/<\/body>/s@^@<script src="/content.js"></script><link rel="stylesheet" href="/static/content.css"><link rel="stylesheet" href="/static/hint.css">@' "$1"
rm "$1.bak"
#static/docs/modules/_excmds_.html

View file

@ -3,4 +3,9 @@
# Combine newtab markdown and template
cd src/static
sed "/REPLACETHIS/s/REPLACETHIS/marked newtab.md/e" newtab.template.html > ../../generated/static/newtab.html
newtab="../../generated/static/newtab.html"
sed "/REPLACETHIS/,$ d" newtab.template.html > "$newtab"
marked newtab.md >> "$newtab"
sed "1,/REPLACETHIS/ d" newtab.template.html >> "$newtab"