Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeignint <37488595+FeignInt@users.noreply.github.com>2020-11-10 23:22:11 +0300
committerkcgen <1557255+kcgen@users.noreply.github.com>2021-08-14 18:30:02 +0300
commit8261493a4c897ee57229698bca3ec05171f0f39c (patch)
tree9400216b239561a51ad9435dfee85d06832503a8 /scripts
parentcc1254b300689803f5f5e257f42b5cf114dd231d (diff)
Add extra_bash_files array to scripts/verify-bash.sh
contrib/linux/bash-completion/dosbox should be linted by shellcheck, but lacks shebang. This commit 'manually' adds file to list Currently it siliently skips missing files listed in the extra_bash_files array, It may be prudent to emitt a warning in future.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/verify-bash.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/verify-bash.sh b/scripts/verify-bash.sh
index 20c0cc8dd..555e69d33 100755
--- a/scripts/verify-bash.sh
+++ b/scripts/verify-bash.sh
@@ -9,11 +9,29 @@
#
# $ ./verify-bash.sh --format=json
+### 2020-11-10 Feignint
+# Added extra_bash_files array, for files that should be shellchecked but
+# are not identified by file, e.g. bash-completion shell function script.
+
+extra_bash_files=(
+ contrib/linux/bash-completion/dosbox
+)
+
list_bash_files () {
git ls-files \
| xargs file \
| grep "Bourne-Again shell script" \
| cut -d ':' -f 1
+
+ for extra_file in "${extra_bash_files[@]}"
+ do
+ if [[ -e "${extra_file}" ]]
+ then
+ echo "${extra_file}"
+ else
+ true # Don't leak none zero exit if file no longer exists
+ fi
+ done
}
main () {