Skip to content

Commit 59d1e23

Browse files
author
hastmu
committed
follow up on shellcheck topics
1 parent 7591764 commit 59d1e23

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.include.build.deb.sh

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare -A DEBIAN
44

55
DEBIAN["Package"]="apt-proxy-detect"
6+
# shellcheck disable=SC2154
67
DEBIAN["Version"]="${branch_version}-${branch_name}-${branch_tag}"
78
DEBIAN["Section"]="base"
89
DEBIAN["Priority"]="optional"

apt-proxy-detect.sh

+2-5
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function check_proxy() {
158158
fi
159159
return 0
160160
fi
161-
elif [ ! -z "${check_proxy_cache[$1.$2]}" ]
161+
elif [ -n "${check_proxy_cache[$1.$2]}" ]
162162
then
163163
return ${check_proxy_cache[$1.$2]}
164164
else
@@ -347,10 +347,7 @@ then
347347
CACHED_PROXIES[${testurl_hash}]="${ret}"
348348
CACHED_PROXIES_AGE[${testurl_hash}]="${now}"
349349
debug "CACHE" "Update cachefile."
350-
declare -p CACHED_PROXIES > "${cache_file}"
351-
declare -p CACHED_PROXIES_AGE >> "${cache_file}"
352-
declare -p WORKING_PROXIES >> "${cache_file}"
353-
declare -p AVAHI_PROXIES >> "${cache_file}"
350+
{ declare -p CACHED_PROXIES ; declare -p CACHED_PROXIES_AGE ; declare -p WORKING_PROXIES ; declare -p AVAHI_PROXIES ; } > "${cache_file}"
354351
fi
355352

356353
exit 0

0 commit comments

Comments
 (0)