summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-01 23:58:47 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-01 23:58:47 +0200
commite66276b03b632895446c797004a4e794cc009e83 (patch)
treee774ce444380205ab2dfde487b7552442319c79a /bin
parentf5f5fed19410efe01b2eca49dace09558783a698 (diff)
bin/pkg: Don't remove non-packages
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/pkg b/bin/pkg
index 43d245a..bbc31c2 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -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 ]) {