diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-11-16 10:56:25 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-11-16 10:56:25 +0100 |
commit | c7d0670d7a8c3a9ff8b80a12158d14a145795ada (patch) | |
tree | 909ec5a8c58418719310f68210c07c0784db23db /bin/pkg | |
parent | 36db5ade7de3a37679e56f0055c7f3d478cc43b8 (diff) |
bin/pkg: pkg_add: Check if a package exists before installing it
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |