소스 검색

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