diff options
| author | Simon Rettberg | 2013-09-09 19:50:13 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2013-09-30 13:22:04 +0200 |
| commit | 6b1733a60dd405552ae478775a6517bad0e33b72 (patch) | |
| tree | 4222daef94ee92ec9e8a8e643815581fd7fa27a1 /remote/modules | |
| parent | [DEMOSERVER] Update install and update script (diff) | |
| download | tm-scripts-6b1733a60dd405552ae478775a6517bad0e33b72.tar.gz tm-scripts-6b1733a60dd405552ae478775a6517bad0e33b72.tar.xz tm-scripts-6b1733a60dd405552ae478775a6517bad0e33b72.zip | |
[german] Try to make locale-gen logic a little smarter
Diffstat (limited to 'remote/modules')
| -rw-r--r-- | remote/modules/german/german.build | 15 | ||||
| -rw-r--r-- | remote/modules/german/german.conf | 3 | ||||
| -rw-r--r-- | remote/modules/german/german.conf.opensuse | 12 | ||||
| -rw-r--r-- | remote/modules/german/german.conf.ubuntu | 4 |
4 files changed, 24 insertions, 10 deletions
diff --git a/remote/modules/german/german.build b/remote/modules/german/german.build index 6327815f..c8795254 100644 --- a/remote/modules/german/german.build +++ b/remote/modules/german/german.build @@ -3,12 +3,17 @@ fetch_source() { } build() { - # Make sure uncompressed locales are present, so we can fetch german utf8 - # Cave: locale-gen is debian/ubunto-specific, so other distris _must_ have /usr/lib/locale/de_DE.utf8! - if [ ! -d "/usr/lib/locale/de_DE.utf8" ]; then + # Debian-like + if [ -e "/etc/locale.gen" ] && ! grep -q -E '^\s*de_DE\.UTF-8' "/etc/locale.gen"; then pinfo "Generating locales..." - locale-gen --purge --no-archive || perror "Could not run locale-gen" - [ ! -d "/usr/lib/locale/de_DE.utf8" ] && perror "locale-gen was executed, but de_DE.utf8 does not exist." + echo 'de_DE.UTF-8 UTF-8' >> "/etc/locale.gen" + locale-gen || perror "Could not generate locales (debian style)" + fi + # Ubuntu's version + if [ -d "/var/lib/locales/supported.d" ] && ! grep -q -E -r '^\s*de_DE\.UTF-8' "/var/lib/locales/supported.d"; then + pinfo "Generating locales..." + echo 'de_DE.UTF-8 UTF-8' >> "/var/lib/locales/supported.d/openslx" + locale-gen "de_DE.UTF-8" || perror "Could not generate locales (ubuntu style)" fi # Put everything we build or get from the system in build dir diff --git a/remote/modules/german/german.conf b/remote/modules/german/german.conf index c79b8ded..e2f82123 100644 --- a/remote/modules/german/german.conf +++ b/remote/modules/german/german.conf @@ -1,6 +1,5 @@ REQUIRED_BINARIES="" REQUIRED_FILES="" REQUIRED_DIRECTORIES=" - /usr/lib/locale/de_DE.utf8 - /usr/share/X11 + /usr/share/X11 " diff --git a/remote/modules/german/german.conf.opensuse b/remote/modules/german/german.conf.opensuse index 015adfe2..1a4a4558 100644 --- a/remote/modules/german/german.conf.opensuse +++ b/remote/modules/german/german.conf.opensuse @@ -1,7 +1,13 @@ REQUIRED_INSTALLED_PACKAGES=" - libX11-data - glibc-locale" + libX11-data + glibc-locale +" REQUIRED_CONTENT_PACKAGES=" - libX11-data" + libX11-data +" +REQUIRED_DIRECTORIES+=" + /usr/lib/locale/de_DE.UTF-8 +" REQUIRED_BINARIES="" REQUIRED_FILES="" + diff --git a/remote/modules/german/german.conf.ubuntu b/remote/modules/german/german.conf.ubuntu index 28e3d966..02262276 100644 --- a/remote/modules/german/german.conf.ubuntu +++ b/remote/modules/german/german.conf.ubuntu @@ -5,3 +5,7 @@ REQUIRED_INSTALLED_PACKAGES=" REQUIRED_CONTENT_PACKAGES=" libX11-data " +REQUIRED_DIRECTORIES+=" + /usr/lib/locale/de_DE.UTF-8 +" + |
