about summary refs log tree commit diff stats
path: root/vienna
diff options
context:
space:
mode:
authorCase Duckworth2022-09-28 22:40:19 -0500
committerCase Duckworth2022-09-28 22:40:19 -0500
commit028f59ebf0fc83d200deed86838d578a44c9ae4a (patch)
tree668d75ec7339e3301d7dbb6915f665c41f3d0692 /vienna
parentadd clean command (diff)
downloadvienna-028f59ebf0fc83d200deed86838d578a44c9ae4a.tar.gz
vienna-028f59ebf0fc83d200deed86838d578a44c9ae4a.zip
shellcheck
Diffstat (limited to 'vienna')
-rwxr-xr-xvienna5
1 files changed, 3 insertions, 2 deletions
diff --git a/vienna b/vienna index 25ba678..8ce8468 100755 --- a/vienna +++ b/vienna
@@ -65,7 +65,7 @@ configure() {
65 ## Initialize state 65 ## Initialize state
66 FILE= 66 FILE=
67 ## Cleanup after we're done 67 ## Cleanup after we're done
68 trap cleanup INT KILL 68 trap cleanup INT QUIT
69} 69}
70 70
71main() { 71main() {
@@ -124,6 +124,7 @@ publish() {
124 124
125shellfix() { # shellfix FILE... 125shellfix() { # shellfix FILE...
126 ## Replace ` with \`, $ with \$, and $$ with $ 126 ## Replace ` with \`, $ with \$, and $$ with $
127 # shellcheck disable=2016
127 sed -E \ 128 sed -E \
128 -e 's/`/\\`/g' \ 129 -e 's/`/\\`/g' \
129 -e 's/(^|[^\$])\$([^\$]|$)/\1\\$\2/g' \ 130 -e 's/(^|[^\$])\$([^\$]|$)/\1\\$\2/g' \
@@ -172,7 +173,7 @@ meta() { # meta FIELD [FILE] < INPUT
172 metafile="$TMPD/${file}.meta" 173 metafile="$TMPD/${file}.meta"
173 test -f "$metafile" || 174 test -f "$metafile" ||
174 sed '/<!--/n;/-->/q' >"$metafile" 175 sed '/<!--/n;/-->/q' >"$metafile"
175 sed -n "s/^[ \t]*$1:[ \t]*//p" <"$metafile" 176 sed -n "s/^[ \t]*$field:[ \t]*//p" <"$metafile"
176} 177}
177 178
178## Customizable bits 179## Customizable bits