diff options
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 |
commit | fa0a9e249727d7895cb6e805e1a5790b448bb8af (patch) | |
tree | 03ae4164c4d47e9f5279fb839a5deeeb79ea361c /system/localepurge/doinst.sh | |
parent | 1df4cbdb780b5923923d838091cf9798f06dd7c5 (diff) |
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.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/localepurge/doinst.sh b/system/localepurge/doinst.sh new file mode 100644 index 000000000000..a631ab8e99b2 --- /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 |