diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-31 14:40:48 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-31 14:40:48 +0200 |
commit | 200f57cf059a25fe011045ae4b64295639625354 (patch) | |
tree | b6cdd36c05c41cac3ed17a2db2991b004d5d7ff6 /bin/pkg | |
parent | 115fbb66c2fdad2d5361562bcc92e7d848e004c8 (diff) |
check priority before removing
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |