mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-03-20 00:13:27 +00:00
fix bugs: old dirs not removed when pkgdel and upgrade package
This commit is contained in:
2
pkgadd
2
pkgadd
@@ -286,7 +286,7 @@ if [ "$UPGRADE_PKG" ] || [ "$REINSTALL_PKG" ]; then
|
||||
rm "$ROOT_DIR/$line" &>/dev/null
|
||||
done
|
||||
grep '/$' $TMP_PKGADD_RMLIST | tac | while read line; do
|
||||
if [ ! "$(grep -R --exclude-dir="$name" -w "$line" "$INDEX_DIR"/*/.files)" ]; then
|
||||
if [ ! "$(grep -Rx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name)" ]; then
|
||||
[ "$VERBOSE_INSTALL" = yes ] && echo "- $line"
|
||||
rmdir "$ROOT_DIR/$line" &>/dev/null
|
||||
fi
|
||||
|
||||
2
pkgdel
2
pkgdel
@@ -175,7 +175,7 @@ while read -r line; do
|
||||
done < <(tac $INDEX_DIR/$name/.files | grep -v '/$')
|
||||
|
||||
while read -r line; do
|
||||
if [ ! "$(grep -R --exclude-dir="$name" -w "$line" "$INDEX_DIR"/*/.files)" ]; then
|
||||
if [ ! "$(grep -Rx "$line" "$INDEX_DIR"/*/.files | grep -v "$INDEX_DIR"/$name)" ]; then
|
||||
if [ -d "$ROOT_DIR/$line" ]; then
|
||||
[ "$VERBOSE_REMOVE" = yes ] && echo "- $line"
|
||||
rmdir "$ROOT_DIR/$line"
|
||||
|
||||
Reference in New Issue
Block a user