summaryrefslogtreecommitdiff
path: root/app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch')
-rw-r--r--app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch b/app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch
new file mode 100644
index 000000000000..2b052ddf4d99
--- /dev/null
+++ b/app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch
@@ -0,0 +1,18 @@
+--- localepurge.orig 2012-12-04 23:08:17.754765708 +0100
++++ localepurge 2012-12-04 23:09:02.397765264 +0100
+@@ -165,7 +165,14 @@
+ ${ACTION} `find ${REMOVEPATH} -type f -o -type l`
+
+ if [ "$SHOWFREEDSPACE" = "enabled" ]; then
+- SPACEAFTER=$(df -P ${REMOVEPATH} | awk '{if ( NR==2 ) { print $3 }}')
++ # if symlink, REMOVEPATH could be removed
++ # check from parentdir then
++ if [ -d ${REMOVEPATH} ]; then
++ SPACEAFTER=$(df -P ${REMOVEPATH} | awk '{if ( NR==2 ) { print $3 }}')
++ else
++ SPACEAFTER=$(df -P ${REMOVEPATH%/*} | awk '{if ( NR==2 ) { print $3 }}')
++ fi
++
+ SPACESUM=$(($SPACEBEFORE - $SPACEAFTER))
+
+ if test $SPACESUM -gt 0 ; then