summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-08-15 00:08:58 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-08-29 02:03:43 -0400
commit0f29bf8ac7e8e99f144e55b8ad9137b5e1f352af (patch)
tree4d3f27e17f141c0c85c5251860866cb8630b1c7a /src
parent11349e48177fefc8fb679e566de0a4fc257dc238 (diff)
refactor pkgbuild-summarize-nonfree
Diffstat (limited to 'src')
-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"