From 1711a5c07c5d35d21f422e59f10c7836953a256e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 23 Sep 2013 19:59:53 -0400 Subject: fullpkg: internationalize --- src/fullpkg/fullpkg-find | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'src/fullpkg/fullpkg-find') diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find index a8f2ac8..1a4f62e 100755 --- a/src/fullpkg/fullpkg-find +++ b/src/fullpkg/fullpkg-find @@ -53,7 +53,7 @@ find_deps() { if ! pkgbuild-check-nonfree > /dev/null 2> /dev/null; then if [ "$?" -eq 15 ]; then - error "pkgbase" has nonfree issues + error "%s has nonfree issues" "$pkgbase" return 15 fi fi @@ -80,7 +80,7 @@ find_deps() { fi # current package plus a space for every level - msg2 "%${LEVEL}s${pkgbase}-$(get_full_version)" + msg2 "%${LEVEL}s%s" '' "${pkgbase}-$(get_full_version)" ## Check next levels declare -i next_level=$LEVEL+1 @@ -128,30 +128,28 @@ CLEANFIRST='false' UPDATEDB='true' usage() { - - echo "" - echo "cd to a dir containing a PKGBUILD and run:" - echo "$(basename $0) [options] " - echo "" - echo "This script will create a build_dir for recursive building" - echo "it tries to find dependencies that aren't built or need update." - echo "" - echo "If no is specified, the script works on a tempdir" - echo "" - echo "OPTIONS:" - echo " -h : this message." - echo " -A : use this ABSROOT." - echo " -c : clean before working." - echo " -m : check deps until this level" - echo " -n : don't update pacman db." - echo "" - exit 1 - + print "Usage: %s [OPTIONS] [BUILD_DIR]" "${0##*/}" + print "Finds package dependencies and sets up a build order" + echo + prose "Run this from a directory containing a PKGBUILD." + echo + prose "This script will create a BUILD_DIR for recursive building; it + tries to find dependencies that aren't built or need update." + echo + prose "If no BUILD_DIR is specified, it will create a temporary + directory." + echo + print "Options:" + flag "-h" "Show this message" + flag "-A <$(_ ABSROOT)>" "Use ABSROOT as the root of the ABS tree" + flag "-c" "Clean BUILD_DIR before working." + flag "-m <$(_ MAX_LEVEL)>" "Limit the depth of the dependency recursion" + flag "-n" "Don't update pacman DB" } while getopts 'hA:l:cmn' arg; do case "$arg" in - h) usage ;; + h) usage; exit 0 ;; A) ABSROOT="$OPTARG" ;; l) LEVEL="$OPTARG" ;; # hidden option to know dep level. c) CLEANFIRST='true' ;; @@ -163,6 +161,7 @@ done if [ ! -r PKGBUILD ]; then error "This directory doesnt contain a PKGBUILD" usage + exit 1 fi shift $(( OPTIND - 1 )) -- cgit v1.2.3-54-g00ecf