summaryrefslogtreecommitdiffstats
path: root/system/localepurge/doinst.sh
diff options
context:
space:
mode:
author Edinaldo P. Silva <edps.mundognu@gmail.com>2016-08-09 16:57:07 +0100
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-13 07:22:19 +0700
commitfa0a9e249727d7895cb6e805e1a5790b448bb8af (patch)
tree03ae4164c4d47e9f5279fb839a5deeeb79ea361c /system/localepurge/doinst.sh
parent1df4cbdb780b5923923d838091cf9798f06dd7c5 (diff)
downloadslackbuilds-fa0a9e249727d7895cb6e805e1a5790b448bb8af.tar.gz
slackbuilds-fa0a9e249727d7895cb6e805e1a5790b448bb8af.tar.xz
system/localepurge: Added (remove superfluous locale data).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/localepurge/doinst.sh')
-rw-r--r--system/localepurge/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/localepurge/doinst.sh b/system/localepurge/doinst.sh
new file mode 100644
index 0000000000..a631ab8e99
--- /dev/null
+++ b/system/localepurge/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/locale.nopurge.new