diff --git a/installpkg b/installpkg index ed5e154..77397d8 100755 --- a/installpkg +++ b/installpkg @@ -378,7 +378,9 @@ main() { parse_opts $(extract_opt $@) - BASEPKGNAME=$(basename $PKGNAME) + if [ -n "$PKGNAME" ]; then + BASEPKGNAME=$(basename $PKGNAME) + fi # disable colour if [ "$NOCOLOR" ]; then diff --git a/scratch b/scratch index a8712f0..fd79d34 100755 --- a/scratch +++ b/scratch @@ -991,6 +991,12 @@ if [ "$mode" = "deplist" ]; then exit 0 fi +# print help message +if [ "$mode" = "help" ]; then + help + exit 0 +fi + # list installed package in system if [ "$mode" = "listinst" ]; then listinstalled