Skip to content

Commit 04b78d9

Browse files
committed
pkg-auto: Address shellcheck complaints
1 parent 4eba9be commit 04b78d9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pkg_auto/impl/gentoo_ver.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ _ver_compare() {
4848

4949
re=${VER_ERE}
5050

51-
[[ ${va} =~ ${re} ]] || fail "${FUNCNAME}: invalid version: ${va}"
51+
[[ ${va} =~ ${re} ]] || fail "${FUNCNAME[0]}: invalid version: ${va}"
5252
an=${BASH_REMATCH[1]}
5353
al=${BASH_REMATCH[3]}
5454
as=${BASH_REMATCH[4]}
5555
ar=${BASH_REMATCH[7]}
5656

57-
[[ ${vb} =~ ${re} ]] || fail "${FUNCNAME}: invalid version: ${vb}"
57+
[[ ${vb} =~ ${re} ]] || fail "${FUNCNAME[0]}: invalid version: ${vb}"
5858
bn=${BASH_REMATCH[1]}
5959
bl=${BASH_REMATCH[3]}
6060
bs=${BASH_REMATCH[4]}
@@ -136,14 +136,14 @@ ver_test() {
136136
va=${PVR}
137137
fi
138138

139-
[[ $# -eq 2 ]] || fail "${FUNCNAME}: bad number of arguments"
139+
[[ $# -eq 2 ]] || fail "${FUNCNAME[0]}: bad number of arguments"
140140

141141
op=${1}
142142
vb=${2}
143143

144144
case ${op} in
145145
-eq|-ne|-lt|-le|-gt|-ge) ;;
146-
*) fail "${FUNCNAME}: invalid operator: ${op}" ;;
146+
*) fail "${FUNCNAME[0]}: invalid operator: ${op}" ;;
147147
esac
148148

149149
_ver_compare "${va}" "${vb}"
@@ -171,7 +171,7 @@ function gentoo_ver_cmp_out() {
171171
out_ref=0
172172
_ver_compare "${v1}" "${v2}" || out_ref=${?}
173173
case ${out_ref} in
174-
1|2|3)
174+
"${GV_LT}"|"${GV_EQ}"|"${GV_GT}")
175175
return 0
176176
;;
177177
*)

pkg_auto/impl/pkg_auto_lib.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,6 +2814,7 @@ function handle_gentoo_sync() {
28142814
local path in_ps category
28152815
if [[ "${old_head}" != "${new_head}" ]]; then
28162816
while read -r path; do
2817+
# shellcheck disable=SC2153 # PORTAGE_STABLE_SUFFIX is not a misspelling
28172818
if [[ ${path} != "${PORTAGE_STABLE_SUFFIX}/"* ]]; then
28182819
continue
28192820
fi

0 commit comments

Comments
 (0)