summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-24 20:51:16 +0100
committerErich Eckner <git@eckner.net>2018-03-24 20:51:16 +0100
commit8db7e5acbe9de5f44ed79ba4ce11947b3586338f (patch)
tree7ebcf856ded618abcd405963f1369db013cf5de3
parent913da48c13219d5f2074880645cbaab0c76376f5 (diff)
downloadbuilder-8db7e5acbe9de5f44ed79ba4ce11947b3586338f.tar.xz
run shellchek in same dir as script
-rwxr-xr-xbin/bootstrap-mysql2
-rwxr-xr-xbin/build-master-status2
-rwxr-xr-xbin/build-master-status-from-mysql2
-rwxr-xr-xbin/build-packages2
-rwxr-xr-xbin/check-bugtracker2
-rwxr-xr-xbin/clean-cache2
-rwxr-xr-xbin/clean-git2
-rwxr-xr-xbin/cleanup2
-rwxr-xr-xbin/copy-to-build-support2
-rwxr-xr-xbin/db-update2
-rwxr-xr-xbin/delete-packages2
-rwxr-xr-xbin/filter-build-logs2
-rwxr-xr-xbin/get-assignment2
-rwxr-xr-xbin/get-package-updates2
-rwxr-xr-xbin/ii-connect2
-rwxr-xr-xbin/interpret-mail2
-rwxr-xr-xbin/modify-package-state2
-rwxr-xr-xbin/ping-from-slave2
-rwxr-xr-xbin/ping-to-master2
-rwxr-xr-xbin/prioritize-build-list2
-rwxr-xr-xbin/return-assignment2
-rwxr-xr-xbin/sanity-check2
-rwxr-xr-xbin/seed-build-list2
-rwxr-xr-xbin/show-dependencies2
-rwxr-xr-xbin/slave-build-connect2
-rwxr-xr-xbin/strict-bashism-check3
-rwxr-xr-xbin/why-dont-you2
-rwxr-xr-xconf/default.conf4
-rwxr-xr-xlib/common-functions2
-rwxr-xr-xlib/mysql-functions2
30 files changed, 32 insertions, 31 deletions
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"
diff --git a/conf/default.conf b/conf/default.conf
index 11483a0..f94f686 100755
--- a/conf/default.conf
+++ b/conf/default.conf
@@ -16,9 +16,9 @@ fi
work_dir="${base_dir}/work"
-# shellcheck source=lib/common-functions
+# shellcheck source=../lib/common-functions
. "${base_dir}/lib/common-functions"
-# shellcheck source=lib/mysql-functions
+# shellcheck source=../lib/mysql-functions
. "${base_dir}/lib/mysql-functions"
repo_names='packages community archlinux32'
diff --git a/lib/common-functions b/lib/common-functions
index 8425e9a..ce33a4f 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -6,7 +6,7 @@
if [ -z "${base_dir}" ]; then
# just to make shellcheck happy
- . 'conf/default.conf'
+ . '../conf/default.conf'
fi
if [ ! -s "${work_dir}/build-master-sanity" ]; then
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 801eca2..aef219b 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -6,7 +6,7 @@
if [ -z "${base_dir}" ]; then
# just to make shellcheck happy
- . 'conf/default.conf'
+ . '../conf/default.conf'
fi
# base64_encode_each encode each line of stdin with base64