diff options
Diffstat (limited to 'sbodeps')
-rwxr-xr-x | sbodeps | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -14,20 +14,23 @@ SELF="$( echo "$0" | sed 's,.*/,,' )" usage() { cat <<EOF $SELF: print dependency tree of SBo builds -B. Watson, 20140911. Licensed under WTFPL: Do WTF you want with this. +B. Watson, 20210308. Licensed under WTFPL: Do WTF you want with this. -Usage: $SELF [-i] [-q] package [package ...] +Usage: $SELF [-i] [-q] [-t] [package [package ...]] -i Ignore installed packages (treat everything as not installed). -q Output a sbopkg queue file (sqf). With -i, this will be a complete queue, with all deps listed. Without -i, the queue file won't contain packages that are already installed (which might mean no output at - all). + all). This is actually the default (-q option not required). +-t Output a recursive 'tree' listing of dependencies. This used to be + the default. A local copy of the slackbuilds.org repository is required, created -with e.g. rsync. By default, this script assumes the current directory -is a mirror of the Slackware version you're running, but you can set -SBOROOT in the environment to use a different location. Example: +with e.g. rsync or 'git clone'. By default, this script assumes +the current directory is the repo of the Slackware version you're +running, but you can set SBOROOT in the environment to use a different +location. Example: export SBOROOT=/home/bob/sbomirror/14.1 @@ -79,10 +82,13 @@ find_deps() { done } +QUEUE=yes while [ "$argsdone" != "yes" ]; do case "$1" in - ''|-h|-help|--help) usage; exit 0 ;; + -h|-help|--help) usage; exit 0 ;; -iq|-qi) QUEUE=yes ; IGNORE=yes ; shift ;; + -it|-ti) QUEUE=no ; IGNORE=yes ; shift ;; + -t) QUEUE=no ; shift ;; -q) QUEUE=yes ; shift ;; -i) IGNORE=yes ; shift ;; -*) echo "Unknown option $1"; usage; exit 1 ;; @@ -105,7 +111,9 @@ fi RETVAL=0 +[ "$1" = "" ] && set "$( basename $( pwd ) )" for arg; do + [ "$arg" = "." ] && arg="$( basename $( pwd ) )" echo -n $arg print_installed_status $arg if [ "$QUEUE" = "yes" ]; then |