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>2020-11-20 22:53:31 -0500
commitf45dbef28349738deff9394b70476a1c670fc1ef (patch)
tree8ec3549397229d423626f5bc02e8bc2e52323d11 /src
parente287e95fb62f8aad77b809e478026659cc974282 (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"