From 176b407483240e50396b8273a62064d87b44d5fa Mon Sep 17 00:00:00 2001 From: emmett1 Date: Wed, 6 Jun 2018 22:43:18 +0800 Subject: [PATCH] updated --- installpkg | 4 +++- scratch | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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