summaryrefslogtreecommitdiff
path: root/src/pkgbuild-check-licenses
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkgbuild-check-licenses')
-rwxr-xr-xsrc/pkgbuild-check-licenses31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/pkgbuild-check-licenses b/src/pkgbuild-check-licenses
index dfae7ae..3fffe0d 100755
--- a/src/pkgbuild-check-licenses
+++ b/src/pkgbuild-check-licenses
@@ -36,11 +36,11 @@ check_licenses() (
return $_E_ERROR # not a PKGBUILD
fi
if [[ -z "${license[*]}" ]]; then
- error "license array of ${pkgbase:-${pkgname[0]}} $(get_full_version) is not set"
+ error "license array of %s %s is not set" "${pkgbase:-${pkgname[0]}}" "$(get_full_version)"
return $_E_ERROR
fi
- msg2 "Looking at license array of ${pkgbase:-${pkgname[0]}} $(get_full_version)"
+ msg2 "Looking at license array of %s %s" "${pkgbase:-${pkgname[0]}}" "$(get_full_version)"
local ret=$_E_OK
for _license in "${license[@]}"; do
@@ -75,21 +75,20 @@ check_licenses() (
return $ret
)
-cmd=${0##*/}
usage() {
- echo "Usage: $cmd [OPTIONS] [PKGBUILD1 PKGBUILD2 ...]"
- echo ''
- echo "If no PKGBUILD is specified, \`./PKGBUILD' is implied"
- echo ''
- echo "Exit status (add them for combinations):"
- echo " 0: Everything OK, no freedom issues"
- echo " 1: Ran with error"
- echo " 2: Uses uncommon licenses, check them"
- echo " 4: Uses known unacceptable licenses"
- echo ''
- echo "Options:"
- echo ' -f Allow running as root user'
- echo ' -h Show this message'
+ print "Usage: %s [OPTIONS] [PKGBUILD1 PKGBUILD2 ...]" "${0##*/}"
+ echo
+ prose 'If no PKGBUILD is specified, `./PKGBUILD` is implied.'
+ echo
+ print "Exit status (add them for combinations):"
+ print " 0: Everything OK, no freedom issues"
+ print " 1: Ran with error"
+ print " 2: Uses uncommon licenses, check them"
+ print " 4: Uses known unacceptable licenses"
+ echo
+ print "Options:"
+ flag '-f' 'Allow running as root user'
+ flag '-h' 'Show this message'
}
_E_OK=0
_E_ERROR=1