summaryrefslogtreecommitdiff
path: root/src/fullpkg/fullpkg-find
diff options
context:
space:
mode:
Diffstat (limited to 'src/fullpkg/fullpkg-find')
-rwxr-xr-xsrc/fullpkg/fullpkg-find43
1 files changed, 21 insertions, 22 deletions
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] <build_dir>"
- 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 <build_dir> is specified, the script works on a tempdir"
- echo ""
- echo "OPTIONS:"
- echo " -h : this message."
- echo " -A <absroot> : use this ABSROOT."
- echo " -c : clean <build_dir> before working."
- echo " -m <max_level> : 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 ))