From 028f59ebf0fc83d200deed86838d578a44c9ae4a Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 28 Sep 2022 22:40:19 -0500 Subject: shellcheck --- vienna | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vienna b/vienna index 25ba678..8ce8468 100755 --- a/vienna +++ b/vienna @@ -65,7 +65,7 @@ configure() { ## Initialize state FILE= ## Cleanup after we're done - trap cleanup INT KILL + trap cleanup INT QUIT } main() { @@ -124,6 +124,7 @@ publish() { shellfix() { # shellfix FILE... ## Replace ` with \`, $ with \$, and $$ with $ + # shellcheck disable=2016 sed -E \ -e 's/`/\\`/g' \ -e 's/(^|[^\$])\$([^\$]|$)/\1\\$\2/g' \ @@ -172,7 +173,7 @@ meta() { # meta FIELD [FILE] < INPUT metafile="$TMPD/${file}.meta" test -f "$metafile" || sed '//q' >"$metafile" - sed -n "s/^[ \t]*$1:[ \t]*//p" <"$metafile" + sed -n "s/^[ \t]*$field:[ \t]*//p" <"$metafile" } ## Customizable bits -- cgit 1.4.1-21-gabe81