summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pkg')
-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