From 32d108456ab49ea5dfe8d4d4ccecda670033cef1 Mon Sep 17 00:00:00 2001 From: Htylol Date: Sat, 3 Aug 2024 11:54:55 +0500 Subject: [PATCH] Update language --- data_from_portwine/scripts/functions_helper | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index be3bc80d..7060c5a7 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -63,13 +63,11 @@ change_locale () { ) out=$("${SET_LANG[@]}") - [ -n "$out" ] || fatal "Language is not set!" - SET_LANG=$(echo "$out" | cut -d'|' -f2) - - echo "${SET_LANG}" > "${PORT_WINE_TMP_PATH}/PortProton_loc" - if [[ ! -z "${SET_LANG}" ]] - then LANGUAGE=${SET_LANG} - else exit 1 + if [[ -z $out ]] ; then + fatal "Language is not set!" + else + LANGUAGE=$(echo "$out" | cut -d '|' -f2) + echo "${LANGUAGE}" > "${PORT_WINE_TMP_PATH}/PortProton_loc" fi fi export LANGUAGE