aboutsummaryrefslogtreecommitdiff
path: root/upkg
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-06-10 19:42:04 -0400
committerB. Watson <yalhcru@gmail.com>2020-06-10 19:42:04 -0400
commitc3238e690a1f3254d282623e047f0124206de9b9 (patch)
treeaad4069d37a258d2d641fef67abd7a3317fde111 /upkg
parentfdab64c728d172419b3cc3f8a566a3fd134ab366 (diff)
downloadsbostuff-c3238e690a1f3254d282623e047f0124206de9b9.tar.gz
cleanup, wip for eventual release
Diffstat (limited to 'upkg')
-rwxr-xr-xupkg21
1 files changed, 20 insertions, 1 deletions
diff --git a/upkg b/upkg
index 7bfb42e..c2d64e3 100755
--- a/upkg
+++ b/upkg
@@ -1,5 +1,24 @@
#!/bin/bash
+if [ "$1" = "--help" ]; then
+cat <<EOF
+upkg - upgrade/install/reinstall a Slackware package.
+
+Usage: upkg <package> [<package> ...]
+
+<package> is an installable Slackware package (.tgz, etc).
+
+If no <package> given, the .info and SlackBuild in the current directory
+are parsed to get a package filename. If this package exists, it will
+be installed.
+
+Actual package installation is done with:
+
+upgradepkg --reinstall --install-new <package>
+EOF
+exit 0
+fi
+
die() {
echo "$( basename $0 ): $@" 1>&2
exit 1
@@ -64,4 +83,4 @@ if [ -z "$@" ]; then
set "$found"
fi
-sudo upgradepkg --reinstall --install-new "$@"
+sudo /sbin/upgradepkg --reinstall --install-new "$@"