Commit 9c3d3e37 authored by Htylol's avatar Htylol

pw_skip_get_info: Fixed the operation of LOCALE_LIST

If the system uses utf8 instead of just utf, the list will not work
parent c33d9ba3
...@@ -2876,12 +2876,13 @@ pw_skip_get_info () { ...@@ -2876,12 +2876,13 @@ pw_skip_get_info () {
if [[ -f "${PW_TMPFS_PATH}/locale.tmp" ]] ; then if [[ -f "${PW_TMPFS_PATH}/locale.tmp" ]] ; then
GET_LOCALE_LIST="ru_RU.utf en_US.utf zh_CN.utf ja_JP.utf ko_KR.utf" GET_LOCALE_LIST="ru_RU.utf en_US.utf zh_CN.utf ja_JP.utf ko_KR.utf"
unset LOCALE_LIST unset LOCALE_LIST LOCALE_UTF
[[ $(<"${PW_TMPFS_PATH}/locale.tmp") =~ utf8 ]] && LOCALE_UTF="8"
for LOCALE in $GET_LOCALE_LIST ; do for LOCALE in $GET_LOCALE_LIST ; do
if [[ $(<"${PW_TMPFS_PATH}/locale.tmp") =~ $LOCALE ]] ; then if [[ $(<"${PW_TMPFS_PATH}/locale.tmp") =~ $LOCALE ]] ; then
if [[ -n "$LOCALE_LIST" ]] if [[ -n "$LOCALE_LIST" ]]
then LOCALE_LIST+="!$LOCALE" then LOCALE_LIST+="!$LOCALE$LOCALE_UTF"
else LOCALE_LIST="$LOCALE" else LOCALE_LIST="$LOCALE$LOCALE_UTF"
fi fi
fi fi
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment