mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-02-06 09:26:35 +00:00
updated
This commit is contained in:
20
removepkg
20
removepkg
@@ -223,16 +223,18 @@ runremovehooks() {
|
||||
|
||||
runpreremovehooks() {
|
||||
|
||||
for hook in $(ls $HOOK_DIR/*.hook); do
|
||||
operation=$(cat "$hook" | grep ^Operation | cut -d ' ' -f3-)
|
||||
target=$(cat "$hook" | grep ^Target | cut -d ' ' -f3-)
|
||||
if [ "$(echo $operation | grep -w "remove" )" ]; then
|
||||
if [ "$(grep -E $target $INDEX_DIR/$1/.files)" ]; then
|
||||
runthishook+=($hook)
|
||||
if [ "$(ls $HOOK_DIR/*.hook 2>/dev/null)" ]; then
|
||||
for hook in $(ls $HOOK_DIR/*.hook); do
|
||||
operation=$(cat "$hook" | grep ^Operation | cut -d ' ' -f3-)
|
||||
target=$(cat "$hook" | grep ^Target | cut -d ' ' -f3-)
|
||||
if [ "$(echo $operation | grep -w "remove" )" ]; then
|
||||
if [ "$(grep -E $target $INDEX_DIR/$1/.files)" ]; then
|
||||
runthishook+=($hook)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
unset operation target
|
||||
done
|
||||
unset operation target
|
||||
done
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user