OSDN Git Service

[fix] : source locale.conf in another process
authorhayao <hayao@fascode.net>
Mon, 29 Mar 2021 13:55:01 +0000 (22:55 +0900)
committerhayao <hayao@fascode.net>
Mon, 29 Mar 2021 13:55:01 +0000 (22:55 +0900)
aptpac

diff --git a/aptpac b/aptpac
index a8c5001..27e46b7 100755 (executable)
--- a/aptpac
+++ b/aptpac
@@ -266,8 +266,7 @@ if [[ "${direct_option}" = false ]]; then
             ADD_OPTION "-Syu"
             ;;
         huawei) 
-            source "/etc/locale.conf"
-            if [[ "${LANG}" = "ja_JP.UTF-8" ]]; then
+            if [[ "$(source "/etc/locale.conf" 2> /dev/null; echo -n "${LANG}")" = "ja_JP.UTF-8" ]]; then
                 echo "(ง •ᴗ•)ว ⁾⁾ファーウェイでウェイウェイ"
                 _exit 0
             else