aboutsummaryrefslogtreecommitdiff
path: root/upkg
diff options
context:
space:
mode:
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 "$@"