From 8db7e5acbe9de5f44ed79ba4ce11947b3586338f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 24 Mar 2018 20:51:16 +0100 Subject: run shellchek in same dir as script --- bin/bootstrap-mysql | 2 +- bin/build-master-status | 2 +- bin/build-master-status-from-mysql | 2 +- bin/build-packages | 2 +- bin/check-bugtracker | 2 +- bin/clean-cache | 2 +- bin/clean-git | 2 +- bin/cleanup | 2 +- bin/copy-to-build-support | 2 +- bin/db-update | 2 +- bin/delete-packages | 2 +- bin/filter-build-logs | 2 +- bin/get-assignment | 2 +- bin/get-package-updates | 2 +- bin/ii-connect | 2 +- bin/interpret-mail | 2 +- bin/modify-package-state | 2 +- bin/ping-from-slave | 2 +- bin/ping-to-master | 2 +- bin/prioritize-build-list | 2 +- bin/return-assignment | 2 +- bin/sanity-check | 2 +- bin/seed-build-list | 2 +- bin/show-dependencies | 2 +- bin/slave-build-connect | 2 +- bin/strict-bashism-check | 3 ++- bin/why-dont-you | 2 +- 27 files changed, 28 insertions(+), 27 deletions(-) (limited to 'bin') diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql index 86fa645..8806fe2 100755 --- a/bin/bootstrap-mysql +++ b/bin/bootstrap-mysql @@ -1,6 +1,6 @@ #!/bin/sh -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: this should become some sort of mysql dump to bootstrap the diff --git a/bin/build-master-status b/bin/build-master-status index c93a9aa..b9e4f87 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -2,7 +2,7 @@ # report about status of build master -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: replace by build-master-status-from-mysql diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql index 962b12e..46e8e38 100755 --- a/bin/build-master-status-from-mysql +++ b/bin/build-master-status-from-mysql @@ -2,7 +2,7 @@ # report about status of build master - according to mysql database -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: add all (necessary) features from build-master-status diff --git a/bin/build-packages b/bin/build-packages index 02334e9..78690b9 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -4,7 +4,7 @@ # Details: # https://github.com/archlinux32/builder/wiki/Build-system#build-packages -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: build other 'architectures', too (pentium4, i486) diff --git a/bin/check-bugtracker b/bin/check-bugtracker index 5bd05b4..e77b47c 100755 --- a/bin/check-bugtracker +++ b/bin/check-bugtracker @@ -5,7 +5,7 @@ # and vice versa # shellcheck disable=SC2039 -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" bug_list=$( diff --git a/bin/clean-cache b/bin/clean-cache index 6e674f9..a2fca62 100755 --- a/bin/clean-cache +++ b/bin/clean-cache @@ -1,6 +1,6 @@ #!/bin/sh -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" if [ $# -eq 0 ]; then diff --git a/bin/clean-git b/bin/clean-git index 2504f2b..00f634d 100755 --- a/bin/clean-git +++ b/bin/clean-git @@ -2,7 +2,7 @@ # clean git repositories -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" for repo in ${repo_names}; do diff --git a/bin/cleanup b/bin/cleanup index c9a8d2b..83bb209 100755 --- a/bin/cleanup +++ b/bin/cleanup @@ -2,7 +2,7 @@ # clean up unnecessary data -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: clean database, too diff --git a/bin/copy-to-build-support b/bin/copy-to-build-support index 404a2b9..9cd90f3 100755 --- a/bin/copy-to-build-support +++ b/bin/copy-to-build-support @@ -2,7 +2,7 @@ # copy the given package(s) into build-support -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # shellcheck disable=SC2016 diff --git a/bin/db-update b/bin/db-update index 6722f24..54d2f87 100755 --- a/bin/db-update +++ b/bin/db-update @@ -13,7 +13,7 @@ # where we move to (think of [extra] -> [community]) # shellcheck disable=SC2039 -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # shellcheck disable=SC2016 diff --git a/bin/delete-packages b/bin/delete-packages index 4343bc7..35ce8dd 100755 --- a/bin/delete-packages +++ b/bin/delete-packages @@ -10,7 +10,7 @@ # is provided by y and no other package which will not be deleted. # shellcheck disable=SC2039 -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: delete other to-be-deleted packages if asked to do so diff --git a/bin/filter-build-logs b/bin/filter-build-logs index 05b534a..9663b80 100755 --- a/bin/filter-build-logs +++ b/bin/filter-build-logs @@ -2,7 +2,7 @@ # filter content of build-logs for display on the webserver -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" { diff --git a/bin/get-assignment b/bin/get-assignment index 7ac749f..7f08d42 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -12,7 +12,7 @@ # 3: come back after the next run of get-package-updates - currently # there are no pending packages -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: honor manual build order of tool-chain: diff --git a/bin/get-package-updates b/bin/get-package-updates index cf2ea6c..f979da3 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -4,7 +4,7 @@ # Details: # https://github.com/archlinux32/builder/wiki/Build-system#get-package-updates -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: Find out, why sometimes package updates are missed. diff --git a/bin/ii-connect b/bin/ii-connect index cf332c0..5f8aacc 100755 --- a/bin/ii-connect +++ b/bin/ii-connect @@ -2,7 +2,7 @@ # run and handle the irc client -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # start ii if it is not running diff --git a/bin/interpret-mail b/bin/interpret-mail index 83c8999..235ac27 100755 --- a/bin/interpret-mail +++ b/bin/interpret-mail @@ -1,6 +1,6 @@ #!/bin/sh -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: enable email interface to delete packages diff --git a/bin/modify-package-state b/bin/modify-package-state index 4a2f5ac..64be18c 100755 --- a/bin/modify-package-state +++ b/bin/modify-package-state @@ -2,7 +2,7 @@ # shellcheck disable=SC2039 -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # shellcheck disable=SC2016 diff --git a/bin/ping-from-slave b/bin/ping-from-slave index afaf018..92bee57 100755 --- a/bin/ping-from-slave +++ b/bin/ping-from-slave @@ -5,7 +5,7 @@ # - show that the build is still running # - get notified by the build master if the build is not necessary anymore -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: receive/save some statistics about current build diff --git a/bin/ping-to-master b/bin/ping-to-master index 15c9120..7a9b4cf 100755 --- a/bin/ping-to-master +++ b/bin/ping-to-master @@ -5,7 +5,7 @@ # - show that the build is still running # - get notified by the build master if the build is not necessary anymore -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: abort build if requested to diff --git a/bin/prioritize-build-list b/bin/prioritize-build-list index db828ae..ef8e4b7 100755 --- a/bin/prioritize-build-list +++ b/bin/prioritize-build-list @@ -1,6 +1,6 @@ #!/bin/sh -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" if [ $# -ne 1 ]; then diff --git a/bin/return-assignment b/bin/return-assignment index 89a1f85..64a6059 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -16,7 +16,7 @@ # TODO: sign database -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" if [ -s "${work_dir}/build-master-sanity" ]; then diff --git a/bin/sanity-check b/bin/sanity-check index 7d1b2f0..2da1605 100755 --- a/bin/sanity-check +++ b/bin/sanity-check @@ -2,7 +2,7 @@ # do some basic sanity checks -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" usage() { diff --git a/bin/seed-build-list b/bin/seed-build-list index ae08d57..a4c1097 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -2,7 +2,7 @@ # seed the build list from differences between an x86_64 and our master mirror -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # shellcheck disable=SC2016 diff --git a/bin/show-dependencies b/bin/show-dependencies index 492f11b..e6de854 100755 --- a/bin/show-dependencies +++ b/bin/show-dependencies @@ -1,6 +1,6 @@ #!/bin/sh -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: can this be faster? diff --git a/bin/slave-build-connect b/bin/slave-build-connect index f8ee9ad..7c6dedc 100755 --- a/bin/slave-build-connect +++ b/bin/slave-build-connect @@ -1,6 +1,6 @@ #!/bin/sh -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" if [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xget-assignment' ] || \ diff --git a/bin/strict-bashism-check b/bin/strict-bashism-check index cbf7e5b..ff1a29a 100755 --- a/bin/strict-bashism-check +++ b/bin/strict-bashism-check @@ -89,9 +89,10 @@ if which shellcheck >/dev/null 2>&1; then errors=$( find bin conf lib \ -type f \ + -not -name 'opcode' \ -not -name 'opcode_list' \ -not -name '.*' \ - -exec shellcheck -x '{}' \; 2>&1 + -execdir shellcheck -x '{}' \; 2>&1 ) if [ -n "${errors}" ]; then diff --git a/bin/why-dont-you b/bin/why-dont-you index e873c71..945639e 100755 --- a/bin/why-dont-you +++ b/bin/why-dont-you @@ -4,7 +4,7 @@ # investigate, why a certain operation is not done with certain packages -# shellcheck source=conf/default.conf +# shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" # TODO: reintrocude "keep", "stubbornly_keep", "stabilize" and "unstage" -- cgit v1.2.3-70-g09d2