From 54a8efa7814cc4dea509fb7036e612f9d7b908af Mon Sep 17 00:00:00 2001 From: emmett1 Date: Mon, 3 Sep 2018 16:51:16 +0800 Subject: [PATCH] fix search option --- scratch | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scratch b/scratch index 834a596..50a614e 100755 --- a/scratch +++ b/scratch @@ -31,15 +31,6 @@ msgwarn() { echo -e "${YELLOW}==> WARNING:${CRESET} $1" } -needarg() { - if [ -z "$@" ]; then - msgerr "This operation require arguments!" - return 1 - else - return 0 - fi -} - needroot() { if [ $UID != 0 ]; then if [ "$#" -eq 0 ]; then @@ -369,7 +360,9 @@ printreadme() { fi } -searchpkg() { +searchpkg() { + needarg $@ + local port found OUTPUT for port in ${PORT_REPO[@]}; do