summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-11-16 10:56:25 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2008-11-16 10:56:25 +0100
commitc7d0670d7a8c3a9ff8b80a12158d14a145795ada (patch)
tree909ec5a8c58418719310f68210c07c0784db23db /bin/pkg
parent36db5ade7de3a37679e56f0055c7f3d478cc43b8 (diff)
bin/pkg: pkg_add: Check if a package exists before installing it
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/pkg b/bin/pkg
index cc07702..0a08f9a 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -165,7 +165,7 @@ function vcs_to_list {
echo -n "$1 git "
echo ${$(git --git-dir=$1/.git log -n 1)[2]}
} else {
- warn "Unsupported or no repository: $1\n"
+ warn "No git repository found: $1\n"
}
}
@@ -475,6 +475,7 @@ function pkg_add {
info "Package '$1' is already installed!\n"
return 100
}
+ list_exists $1 || die "No such package: $1\n"
info "Retrieving package $1...\n"
cd $PDIR || return 255
vcs_add $1 || return 255