aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-03-08 17:36:30 -0500
committerB. Watson <yalhcru@gmail.com>2021-03-08 17:36:30 -0500
commit9d40699c0982cbd36ee9cb6e71db2dc6e483a05f (patch)
tree1952c75567f10acf4f32a81052594ab803dcd741
parentcd32db9db5858cfbfe22c7fc7a0b2d612f9f6591 (diff)
downloadsbostuff-9d40699c0982cbd36ee9cb6e71db2dc6e483a05f.tar.gz
sbodeps: use current dir if no args
-rwxr-xr-xsbodeps22
1 files changed, 15 insertions, 7 deletions
diff --git a/sbodeps b/sbodeps
index 87a274b..62561c2 100755
--- a/sbodeps
+++ b/sbodeps
@@ -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