summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-10 01:03:04 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 15:43:37 -0400
commit834db9d400be1795426eb88cf25c9e817141d326 (patch)
treeedc61f60497720d3eb9a312403eb4e5c8ecf50e9 /src
parent61882e4d79a02cb5d32a9b558ee3a0c15f62d01a (diff)
internationalize pkgbuild-check-*
Diffstat (limited to 'src')
-rwxr-xr-xsrc/pkgbuild-check-licenses31
-rwxr-xr-xsrc/pkgbuild-check-nonfree27
2 files changed, 28 insertions, 30 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
diff --git a/src/pkgbuild-check-nonfree b/src/pkgbuild-check-nonfree
index b371540..7c8ca9f 100755
--- a/src/pkgbuild-check-nonfree
+++ b/src/pkgbuild-check-nonfree
@@ -70,21 +70,20 @@ check_deps() (
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:"
- echo " 0: Everything OK, no freedom issues"
- echo " 1: Ran with error"
- echo " 15: Depends on non-free packages"
- echo ''
- echo "Options:"
- echo ' -c Use the cached blacklist, do not try downloading.'
- 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:"
+ print " 0: Everything OK, no freedom issues"
+ print " 1: Ran with error"
+ print " 15: Depends on non-free packages"
+ echo
+ print "Options:"
+ flag '-c' 'Use the cached blacklist, do not try downloading.'
+ flag '-f' 'Allow running as root user'
+ flag '-h' 'Show this message'
}
main() {