summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/check-opcodes2
-rwxr-xr-xbin/create-build-support-package2
-rwxr-xr-xbin/local-build-package2
-rwxr-xr-xbin/manage-slaves23
-rwxr-xr-xbin/nit-picker4
-rwxr-xr-xbin/return-assignment12
6 files changed, 21 insertions, 24 deletions
diff --git a/bin/check-opcodes b/bin/check-opcodes
index e8bb807..2949819 100755
--- a/bin/check-opcodes
+++ b/bin/check-opcodes
@@ -122,7 +122,7 @@ debug "Checking for architecture: $ARCH ($OPCODE_ARGS).."
# shellcheck disable=SC2044
for absfile in $(find $tmp_dir \( -regextype grep -regex '.*\.so\(\.[0-9.]\+\)\?' -type f \) -o \( -executable -type f \) ); do
file=$(basename $absfile)
- relfile=${absfile#$tmp_dir}
+ relfile=${absfile#"${tmp_dir}"}
debug "Checking file: $relfile"
if ! readelf -a $absfile > $tmp_dir/$file.elf 2>/dev/null; then
debug "readelf failed, ignoring file"
diff --git a/bin/create-build-support-package b/bin/create-build-support-package
index 09374ec..43fb592 100755
--- a/bin/create-build-support-package
+++ b/bin/create-build-support-package
@@ -169,7 +169,7 @@ if [ -n "${source_package}" ]; then
fi
new_pkg="${pkg%-*-*-*}"
- new_pkg="${new_pkg}-shim${pkg#${new_pkg}}"
+ new_pkg="${new_pkg}-shim${pkg#"${new_pkg}"}"
failsafe_rsync \
"${master_mirror_rsync_directory}/pool/${pkg}" \
diff --git a/bin/local-build-package b/bin/local-build-package
index c6fb029..97cc998 100755
--- a/bin/local-build-package
+++ b/bin/local-build-package
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# build one package to test if modifications are ok (before opening a pull
# request in https://github.com/archlinux32/packages)
diff --git a/bin/manage-slaves b/bin/manage-slaves
index 3dbd83a..32883a3 100755
--- a/bin/manage-slaves
+++ b/bin/manage-slaves
@@ -35,19 +35,16 @@ fi
case "$1" in
'list')
- infos=$(
- # shellcheck disable=SC2016
- {
- printf 'SELECT'
- printf ' name, CASE WHEN access_allowed = 1 THEN "enabled" ELSE "disabled" END '
- printf ' name, CASE WHEN is_sane = 1 THEN "sane" ELSE "not sane" END '
- printf ' FROM build_slaves'
- printf ';\n'
- } | \
- mysql_run_query | \
- tr '\t' ' '
- )
- echo "${infos[@]}"
+ # shellcheck disable=SC2016
+ {
+ printf 'SELECT'
+ printf ' name, CASE WHEN access_allowed = 1 THEN "enabled" ELSE "disabled" END '
+ printf ' name, CASE WHEN is_sane = 1 THEN "sane" ELSE "not sane" END '
+ printf ' FROM build_slaves'
+ printf ';\n'
+ } | \
+ mysql_run_query | \
+ tr '\t' ' '
;;
'add')
shift
diff --git a/bin/nit-picker b/bin/nit-picker
index 8dd0156..56321b9 100755
--- a/bin/nit-picker
+++ b/bin/nit-picker
@@ -281,9 +281,9 @@ while pgrep -x ii >/dev/null \
case "${action}" in
'commit') # check whether a given commit is present in the git repo
git_repo="${parameters%% *}"
- git_rev="${parameters#${git_repo} }"
+ git_rev="${parameters#"${git_repo}" }"
git_head="${git_rev%% *}"
- git_rev="${git_rev#${git_head} }"
+ git_rev="${git_rev#"${git_head}" }"
# shellcheck disable=SC2016
eval "$(
printf 'git_dir="${repo_paths__%s}"\n' \
diff --git a/bin/return-assignment b/bin/return-assignment
index a0cbbbb..eca5af7 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -142,25 +142,25 @@ if [ "$6" = 'ERROR' ]; then
exit 2
fi
build_assignment_architecture="${infos##* }"
- infos="${infos% ${build_assignment_architecture}}"
+ infos="${infos% "${build_assignment_architecture}"}"
pkgrel="${infos##* }"
- infos="${infos% ${pkgrel}}"
+ infos="${infos% "${pkgrel}"}"
epoch="${infos##* }"
- infos="${infos% ${epoch}}"
+ infos="${infos% "${epoch}"}"
pkgver="${infos##* }"
- infos="${infos% ${pkgver}}"
+ infos="${infos% "${pkgver}"}"
pkgver=$(
printf '%s' "${pkgver}" \
| base64 -d
)
upstream_flag_date="${infos##* }"
- infos="${infos% ${upstream_flag_date}}"
+ infos="${infos% "${upstream_flag_date}"}"
upstream_flag_date=$(
printf '%s' "${upstream_flag_date}" \
| base64 -d
)
was_broken_before="${infos##* }"
- build_assignment_id="${infos% ${was_broken_before}}"
+ build_assignment_id="${infos% "${was_broken_before}"}"
# save sent build logs
saved_build_logs=$(