From 38663b766ce000d471a86e002ef756dd65b7e1ca Mon Sep 17 00:00:00 2001 From: hydrargyrum Date: Tue, 11 Jul 2023 22:00:54 +0200 Subject: [PATCH] add "# shellcheck enable=" to files validated --- altlines/altlines | 1 + cheapthrottle/cheapthrottle | 1 + crc/test.sh | 1 + first-avail-command/test.sh | 1 + flatten-json/test.sh | 1 + fonts2png/fonts2png | 1 + gen-indexhtml/gen-indexhtml | 1 + git/git-adapt-commit | 1 + git/git-amend-author | 3 ++- git/git-cherry-pick-on-path | 1 + git/git-combine-remotes | 1 + git/git-commit-with-mtime | 1 + git/git-copy-files-from | 1 + git/git-midnight | 1 + git/git-recpbranch | 1 + group-files-by-mtime/group-files-by-mtime | 1 + group-lines/test.sh | 1 + headset-bluez/headset-bluez | 1 + hexgen/test.sh | 1 + ini2json/test.sh | 1 + json-elide-strings/test.sh | 1 + log-snippet/log-snippet.sh | 1 + multiman/multiman | 1 + nested-jq/nested-jq | 1 + pass-ls-entries/pass-ls-entries | 1 + pdf-watermark/pdf-watermark | 1 + pvrun/pvrun | 1 + screen-msg/screen-set-hardstatus | 1 + screen-msg/screen-set-transient | 1 + show-args/show-args | 1 + sort-with-numbers/test.sh | 1 + ssh-tools/ssh-fingerprint-current-host | 1 + ssh-tools/ssh-known-fingerprint | 1 + stfu/stfu | 1 + toml2json/test.sh | 1 + zeropipe/zeropipe | 1 + 36 files changed, 37 insertions(+), 1 deletion(-) diff --git a/altlines/altlines b/altlines/altlines index b01a33d..4817df3 100755 --- a/altlines/altlines +++ b/altlines/altlines @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= if [ -t 1 ] then diff --git a/cheapthrottle/cheapthrottle b/cheapthrottle/cheapthrottle index c0e5477..c262144 100755 --- a/cheapthrottle/cheapthrottle +++ b/cheapthrottle/cheapthrottle @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= # typical usage: cheapthrottle PID diff --git a/crc/test.sh b/crc/test.sh index 7ac992b..4493931 100755 --- a/crc/test.sh +++ b/crc/test.sh @@ -1,4 +1,5 @@ #!/bin/sh -eu +# shellcheck enable= cd "$(dirname "$0")" diff --git a/first-avail-command/test.sh b/first-avail-command/test.sh index 5457fa7..3db4dce 100755 --- a/first-avail-command/test.sh +++ b/first-avail-command/test.sh @@ -1,5 +1,6 @@ #!/bin/sh -eu # SPDX-License-Identifier: WTFPL +# shellcheck enable= cd "$(dirname "$0")" diff --git a/flatten-json/test.sh b/flatten-json/test.sh index 5dc8de3..5052aa8 100755 --- a/flatten-json/test.sh +++ b/flatten-json/test.sh @@ -1,5 +1,6 @@ #!/bin/sh -eu # SPDX-License-Identifier: WTFPL +# shellcheck enable= cd "$(dirname "$0")" diff --git a/fonts2png/fonts2png b/fonts2png/fonts2png index 1894d6d..9c860de 100755 --- a/fonts2png/fonts2png +++ b/fonts2png/fonts2png @@ -1,5 +1,6 @@ #!/bin/sh # SPDX-License-Identifier: WTFPL +# shellcheck enable= # 2012-05-12 text='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz diff --git a/gen-indexhtml/gen-indexhtml b/gen-indexhtml/gen-indexhtml index cb7abc7..fa6de0e 100755 --- a/gen-indexhtml/gen-indexhtml +++ b/gen-indexhtml/gen-indexhtml @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= die () { ex=$1 diff --git a/git/git-adapt-commit b/git/git-adapt-commit index e68e7f0..1a7a93d 100755 --- a/git/git-adapt-commit +++ b/git/git-adapt-commit @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= usage() { cat <<-EOF diff --git a/git/git-amend-author b/git/git-amend-author index a9258f4..d32b795 100755 --- a/git/git-amend-author +++ b/git/git-amend-author @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= if [ $# -ne 2 ] then @@ -7,7 +8,7 @@ then usage: $0 Amends the last commit and change both author and committer names to - NAME and emails to EMAIL. Do not touch the author timestamp. + NAME and emails to EMAIL. Does not touch the author timestamp. EOF exit 64 # EX_USAGE fi diff --git a/git/git-cherry-pick-on-path b/git/git-cherry-pick-on-path index fd2cb20..b24d007 100755 --- a/git/git-cherry-pick-on-path +++ b/git/git-cherry-pick-on-path @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= usage () { cat <<- EOF diff --git a/git/git-combine-remotes b/git/git-combine-remotes index 4f8442d..3cf9807 100755 --- a/git/git-combine-remotes +++ b/git/git-combine-remotes @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= if [ $# -lt 2 ] then diff --git a/git/git-commit-with-mtime b/git/git-commit-with-mtime index af348fb..e3c82f3 100755 --- a/git/git-commit-with-mtime +++ b/git/git-commit-with-mtime @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= usage () { cat <<- EOF diff --git a/git/git-copy-files-from b/git/git-copy-files-from index 7590768..d77cb84 100755 --- a/git/git-copy-files-from +++ b/git/git-copy-files-from @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= usage () { cat <<- EOF diff --git a/git/git-midnight b/git/git-midnight index de142e5..07c4a0c 100755 --- a/git/git-midnight +++ b/git/git-midnight @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= # like git-commit(1) but fake the commit date to use midnight today # useful for privacy reasons diff --git a/git/git-recpbranch b/git/git-recpbranch index 9dac7da..65907c2 100755 --- a/git/git-recpbranch +++ b/git/git-recpbranch @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= # if you have # master --- A --- featureA diff --git a/group-files-by-mtime/group-files-by-mtime b/group-files-by-mtime/group-files-by-mtime index 5bca8f3..fbcc315 100755 --- a/group-files-by-mtime/group-files-by-mtime +++ b/group-files-by-mtime/group-files-by-mtime @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= # requires GNU find(1) for "-printf" usage () { diff --git a/group-lines/test.sh b/group-lines/test.sh index 66bc5ad..b517c08 100755 --- a/group-lines/test.sh +++ b/group-lines/test.sh @@ -1,4 +1,5 @@ #!/bin/sh -eu +# shellcheck enable= cd "$(dirname "$0")" diff --git a/headset-bluez/headset-bluez b/headset-bluez/headset-bluez index f255022..69048a1 100755 --- a/headset-bluez/headset-bluez +++ b/headset-bluez/headset-bluez @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= # Enable a bluetooth headset and out or in/out mode. find_bluez () { diff --git a/hexgen/test.sh b/hexgen/test.sh index edfc6b1..91b396a 100755 --- a/hexgen/test.sh +++ b/hexgen/test.sh @@ -1,4 +1,5 @@ #!/bin/sh -eu +# shellcheck enable= cd "$(dirname "$0")" diff --git a/ini2json/test.sh b/ini2json/test.sh index c61c416..05ed636 100755 --- a/ini2json/test.sh +++ b/ini2json/test.sh @@ -1,4 +1,5 @@ #!/bin/sh -eu +# shellcheck enable= cd "$(dirname "$0")" diff --git a/json-elide-strings/test.sh b/json-elide-strings/test.sh index f7eaf4e..ec1f1c7 100755 --- a/json-elide-strings/test.sh +++ b/json-elide-strings/test.sh @@ -1,5 +1,6 @@ #!/bin/sh -eu # SPDX-License-Identifier: WTFPL +# shellcheck enable= cd "$(dirname "$0")" diff --git a/log-snippet/log-snippet.sh b/log-snippet/log-snippet.sh index 1f0abe7..472e763 100755 --- a/log-snippet/log-snippet.sh +++ b/log-snippet/log-snippet.sh @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= usage () { cat <<- EOF diff --git a/multiman/multiman b/multiman/multiman index a1449b6..757298a 100755 --- a/multiman/multiman +++ b/multiman/multiman @@ -1,5 +1,6 @@ #!/bin/sh -eu # SPDX-License-Identifier: WTFPL +# shellcheck enable= printlines () { printf "%s\n" "$@" diff --git a/nested-jq/nested-jq b/nested-jq/nested-jq index 8d36f60..d599a1a 100755 --- a/nested-jq/nested-jq +++ b/nested-jq/nested-jq @@ -1,4 +1,5 @@ #!/bin/sh -e +# shellcheck enable= nested () { ex=$1 diff --git a/pass-ls-entries/pass-ls-entries b/pass-ls-entries/pass-ls-entries index 5e0d507..19ef587 100755 --- a/pass-ls-entries/pass-ls-entries +++ b/pass-ls-entries/pass-ls-entries @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= # list pass(1) entries in find(1) format, not tree(1) format # example: # diff --git a/pdf-watermark/pdf-watermark b/pdf-watermark/pdf-watermark index 6fcf1de..52f713d 100755 --- a/pdf-watermark/pdf-watermark +++ b/pdf-watermark/pdf-watermark @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= usage () { cat <<- EOF diff --git a/pvrun/pvrun b/pvrun/pvrun index 47d1922..2b4c948 100755 --- a/pvrun/pvrun +++ b/pvrun/pvrun @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= usage () { cat <<- EOF diff --git a/screen-msg/screen-set-hardstatus b/screen-msg/screen-set-hardstatus index 6c9640b..3bcbbca 100755 --- a/screen-msg/screen-set-hardstatus +++ b/screen-msg/screen-set-hardstatus @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= printf "\033_%s\033\\" "$*" # or: diff --git a/screen-msg/screen-set-transient b/screen-msg/screen-set-transient index fa86497..8638c48 100755 --- a/screen-msg/screen-set-transient +++ b/screen-msg/screen-set-transient @@ -1,4 +1,5 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= printf "\033^%s\033\\" "$*" diff --git a/show-args/show-args b/show-args/show-args index 427600a..e1a5f45 100755 --- a/show-args/show-args +++ b/show-args/show-args @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= # usage: show-args ARGUMENTS... # just show args, one per line # example: diff --git a/sort-with-numbers/test.sh b/sort-with-numbers/test.sh index 0cf862b..f56bda1 100755 --- a/sort-with-numbers/test.sh +++ b/sort-with-numbers/test.sh @@ -1,4 +1,5 @@ #!/bin/sh -eu +# shellcheck enable= cd "$(dirname "$0")" diff --git a/ssh-tools/ssh-fingerprint-current-host b/ssh-tools/ssh-fingerprint-current-host index 6a796e3..9291495 100755 --- a/ssh-tools/ssh-fingerprint-current-host +++ b/ssh-tools/ssh-fingerprint-current-host @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= for pub in /etc/ssh/*.pub do diff --git a/ssh-tools/ssh-known-fingerprint b/ssh-tools/ssh-known-fingerprint index bb464e6..4805322 100755 --- a/ssh-tools/ssh-known-fingerprint +++ b/ssh-tools/ssh-known-fingerprint @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= if [ $# -lt 1 ] || [ $# -gt 2 ] then diff --git a/stfu/stfu b/stfu/stfu index 2878034..fd1aa5a 100755 --- a/stfu/stfu +++ b/stfu/stfu @@ -1,5 +1,6 @@ #!/bin/sh -eu # SPDX-License-Identifier: WTFPL +# shellcheck enable= # Fire and forget a command, run in background, discard stdout/stderr. # Accept "-l" for still logging output to a temp file. diff --git a/toml2json/test.sh b/toml2json/test.sh index d28494d..5a9f89c 100755 --- a/toml2json/test.sh +++ b/toml2json/test.sh @@ -1,4 +1,5 @@ #!/bin/sh -eu +# shellcheck enable= cd "$(dirname "$0")" diff --git a/zeropipe/zeropipe b/zeropipe/zeropipe index 07b761a..0ae4594 100755 --- a/zeropipe/zeropipe +++ b/zeropipe/zeropipe @@ -1,5 +1,6 @@ #!/bin/sh -e # SPDX-License-Identifier: WTFPL +# shellcheck enable= usage () { cat <<- EOF