about summary refs log tree commit diff
path: root/installer.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@voidlinux.eu>2015-05-29 17:44:31 +0200
committerJuan RP <xtraeme@voidlinux.eu>2015-05-29 17:44:31 +0200
commitec5a92c2705021c9d228919cc608d1d54e6edcf6 (patch)
treefd07014996c4e1a67e7e5f24a3029f113b61937f /installer.sh.in
parentc4ca2a33fae3a69f9658d535bc0c3807dfa9fd83 (diff)
downloadhrmpf-ec5a92c2705021c9d228919cc608d1d54e6edcf6.tar.gz
hrmpf-ec5a92c2705021c9d228919cc608d1d54e6edcf6.tar.xz
hrmpf-ec5a92c2705021c9d228919cc608d1d54e6edcf6.zip
installer: disable locale setting with musl.
Diffstat (limited to 'installer.sh.in')
-rw-r--r--installer.sh.in15
1 files changed, 8 insertions, 7 deletions
diff --git a/installer.sh.in b/installer.sh.in
index ed2782b..90a69bc 100644
--- a/installer.sh.in
+++ b/installer.sh.in
@@ -323,13 +323,14 @@ menu_locale() {
 }
 
 set_locale() {
-    local LOCALE=$(get_option LOCALE)
-
-    sed -i -e "s|LANG=.*|LANG=$LOCALE|g" $TARGETDIR/etc/locale.conf
-    # Uncomment locale from /etc/default/libc-locales and regenerate it.
-    sed -e "/${LOCALE}/s/^\#//" -i $TARGETDIR/etc/default/libc-locales
-    echo "Running xbps-reconfigure -f glibc-locales ..." >$LOG
-    chroot $TARGETDIR xbps-reconfigure -f glibc-locales >$LOG 2>&1
+    if [ -f $TARGETDIR/etc/default/libc-locales ]; then
+        local LOCALE=$(get_option LOCALE)
+        sed -i -e "s|LANG=.*|LANG=$LOCALE|g" $TARGETDIR/etc/locale.conf
+        # Uncomment locale from /etc/default/libc-locales and regenerate it.
+        sed -e "/${LOCALE}/s/^\#//" -i $TARGETDIR/etc/default/libc-locales
+        echo "Running xbps-reconfigure -f glibc-locales ..." >$LOG
+        chroot $TARGETDIR xbps-reconfigure -f glibc-locales >$LOG 2>&1
+    fi
 }
 
 menu_timezone() {