diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-01 23:58:47 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-01 23:58:47 +0200 |
commit | e66276b03b632895446c797004a4e794cc009e83 (patch) | |
tree | e774ce444380205ab2dfde487b7552442319c79a /bin | |
parent | f5f5fed19410efe01b2eca49dace09558783a698 (diff) |
bin/pkg: Don't remove non-packages
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -109,10 +109,8 @@ pkg_add () { } pkg_remove () { - if ([ ! -d $PDIR/$1 ]) { - info "Package '$1' is not installed!\n" - return 100 - } + [ -d $PDIR/$1 ] || die "Package '$1' is not installed!\n" + [ -d $PDIR/$1/.hg ] || die "Not a valid package: '$1'\n" cd $PDIR/$1 if ([ -r priority ]) { if ([ $(cat priority) -gt 3 ]) { |