summarylogtreecommitdiffstats
path: root/localepurge.config.diff
diff options
context:
space:
mode:
Diffstat (limited to 'localepurge.config.diff')
-rw-r--r--localepurge.config.diff49
1 files changed, 13 insertions, 36 deletions
diff --git a/localepurge.config.diff b/localepurge.config.diff
index adbf2ae871a..83f02185365 100644
--- a/localepurge.config.diff
+++ b/localepurge.config.diff
@@ -1,6 +1,6 @@
---- ../localepurge-orig/debian/localepurge.config 2013-09-20 14:01:46.000000000 +0200
-+++ localepurge.config 2013-09-21 15:31:10.574338160 +0200
-@@ -2,36 +2,22 @@
+--- localepurge.conf.orig 2014-02-04 18:17:32.554174127 +0100
++++ localepurge.conf 2014-02-04 18:21:08.911092875 +0100
+@@ -2,26 +2,11 @@
set -e
@@ -9,9 +9,7 @@
# first get all possible locales and create a full list of locale values:
-CONFIG_FILE="/etc/locale.nopurge"
--TEMPFILE=$(tempfile).$$
-+#TEMPFILE=$(tempfile).$$ ## tempfile command is part of debianutils package
-+TEMPFILE=$(mktemp).$$
+ TEMPFILE="$(mktemp --suffix ".locales")"
LOCALELIST=/var/cache/localepurge/localelist
-conf_has_key() {
@@ -29,19 +27,7 @@
# for the purpose of presenting a ready made preselection at the very first
# configuration, include already configured locales from locales package:
--LOCALEGEN=$(tempfile).locale.gen
-+LOCALEGEN=$(mktemp).locale.gen
- touch "$LOCALEGEN"
-
- if [ -f /etc/locale.gen ]; then
- grep ^[a-z] /etc/locale.gen | cut -d" " -f1 > "$LOCALEGEN"
- # add double character locale names from underscore variations
-- # for later preselection:
-+ # for later preselection:
- cut -d"_" -f1 "$LOCALEGEN" | sort -u >> "$LOCALEGEN"
- fi
-
-@@ -47,9 +33,8 @@
+@@ -46,9 +31,7 @@
# include locales supported by the locales package:
@@ -49,11 +35,10 @@
- grep ^[a-z] /usr/share/i18n/SUPPORTED | cut -d' ' -f1 | sort -u >> "$TEMPFILE"
-fi
+find /usr/share/locale -maxdepth 1 -type d -name "*" -printf "%f\n" | grep "^[a-z]" | cut -d" " -f1 | sort -u >> "$TEMPFILE"
-+#find /usr/share/i18n/locales -maxdepth 1 -type f -name "*" -printf "%f\n" | grep "^[a-z]" | cut -d" " -f1 | sort -u >> "$TEMPFILE"
# include locales from our previous localelist if it already exists:
-@@ -60,8 +45,7 @@
+@@ -59,8 +42,7 @@
# include locales from newly added locales:
NEWLOCALELIST="$LOCALELIST"-new
@@ -63,20 +48,12 @@
cat "$NEWLOCALELIST" >> "$TEMPFILE"
rm -f "$NEWLOCALELIST"
fi
-@@ -74,102 +58,14 @@
-
- if [ ! -f "$LOCALELIST" ]; then
- if [ ! -d /var/cache/localepurge ]; then
-- mkdir -m 755 /var/cache/localepurge
-+ mkdir -m 755 /var/cache/localepurge
- fi
- sort -u "$TEMPFILE" > "$LOCALELIST"
-- else
-+else
+@@ -79,96 +61,9 @@
+ else
mv "$LOCALELIST" "$LOCALELIST"-old
sort -u "$TEMPFILE" > "$LOCALELIST"
- fi
-
+-fi
+-
-# finally sort and create full list of all collected locale names
-
-LOCALES=$(sort -u "$TEMPFILE" | tr '\n' ' ' \
@@ -102,12 +79,12 @@
-
- PRESELECT=$(sort -u "$LOCALEGEN" | tr '\n' ' ' \
- | sed 's/\ /,\ /g' | sed 's/,\ $//g')
--fi
--
+ fi
+
# deleting temporary files not needed anymore:
rm -f "$TEMPFILE" "$LOCALEGEN"
--
+
-#############################################################
-# now that all locale data is in place let debconf take over:
-