summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-10-26 08:54:46 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2008-10-26 08:54:46 +0100
commitd865d2081061c23d1b8f1523e04b3bdd05f6dff9 (patch)
tree705cf9fb6c282bebc6238041409601a4ea381709
parent64ca2560e87f398d5bfe71c0fb5fc877c85fe050 (diff)
bin/pkg: Made check_valid more fitting to it's name
-rwxr-xr-xbin/pkg8
1 files changed, 4 insertions, 4 deletions
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