From d865d2081061c23d1b8f1523e04b3bdd05f6dff9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 26 Oct 2008 08:54:46 +0100 Subject: bin/pkg: Made check_valid more fitting to it's name --- bin/pkg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/pkg b/bin/pkg index 9b9937f..b90acef 100755 --- a/bin/pkg +++ b/bin/pkg @@ -46,7 +46,9 @@ function check_installed { } function check_valid { - [[ -d $PDIR/$1/.git ]] || die "Not a valid package name: '$1'\n" + if [[ -z $(list_exists $1) ]] { + die "No suche package: '$1'\n" + } } function clear_line { @@ -568,9 +570,7 @@ function pkg_update_local { function pkg_info { cd $PDIR - if [[ -z $(list_exists $1) ]] { - die "No suche package: '$1'\n" - } + check_valid $1 # Fetch the infos NAME=$1 -- cgit v1.2.3