瀏覽代碼

installer: disable locale setting with musl.

Juan RP 10 年之前
父節點
當前提交
ec5a92c270
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      installer.sh.in

+ 8 - 7
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() {