summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-08-15 00:08:58 -0400
committerAndreas Grapentin <andreas@grapentin.org>2022-01-18 17:31:51 +0100
commit80ac5004220942e9321c689efabc9d7b45cbe27a (patch)
tree46d84aa25170f4a62880cfa521977bc2f52aff1c
parent206fba418e7311f9d1d311ad11f22929d38dd7fe (diff)
refactor pkgbuild-summarize-nonfree
-rwxr-xr-xsrc/pkgbuild-summarize-nonfree14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pkgbuild-summarize-nonfree b/src/pkgbuild-summarize-nonfree
index af220a8..66bb413 100755
--- a/src/pkgbuild-summarize-nonfree
+++ b/src/pkgbuild-summarize-nonfree
@@ -64,19 +64,19 @@ main() {
warning() { :; }
fi
- parse "$1"
+ report "$1"
}
-parse() {
+report() {
[[ $# == 1 ]] || panic 'malformed call to parse'
- declare -i s=$1;
+ declare -i detected_code=$1
declare -i ret=$EXIT_SUCCESS
- declare -i i
+ declare -i freedom_status_code
- for i in 1 2 4 8 16 32; do
- if [[ $((s & i)) -gt 0 ]]; then
- case $i in
+ for freedom_status_code in 1 2 4 8 16 32; do
+ if [[ $((detected_code & freedom_status_code)) -gt 0 ]]; then
+ case $freedom_status_code in
$_E_ERROR)
# could be anything, assume the worst
error "There was an error processing the PKGBUILD"