summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-05-31 14:40:48 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-05-31 14:40:48 +0200
commit200f57cf059a25fe011045ae4b64295639625354 (patch)
treeb6cdd36c05c41cac3ed17a2db2991b004d5d7ff6 /bin/pkg
parent115fbb66c2fdad2d5361562bcc92e7d848e004c8 (diff)
check priority before removing
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/pkg b/bin/pkg
index 133d055..e16aa8b 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -90,6 +90,14 @@ pkg_remove () {
info "Package '$1' is not installed!\n"
return 100
}
+ cd $PDIR/$1
+ if ([ -r priority ]) {
+ if ([ $(cat priority) -gt 3 ]) {
+ warn "Package '$1' is $(real_priority $(cat priority)). Really remove? [y/N] "
+ read
+ [ "$REPLY" = 'y' ] || return
+ }
+ }
if ([ -f $PDIR/$1/hooks/pre-remove ]) {
info 'Executing pre-remove hook\n'
. $PDIR/$1/hooks/pre-remove