From 49e81553c278812cdcf48af0a2e73bb3210e273b Mon Sep 17 00:00:00 2001 From: WXbet Date: Sat, 31 Oct 2020 16:47:42 +0100 Subject: [PATCH] s3.TUP Fix toolchain menu infinite loop (v0.22.3) - fix infinite loop when loading toolchain menu on non x86|x86_64|amd64|i686 systems (e.g. Rasbian Pi) - fix correct quoting of escape characters in language variables --- support/functions/_plugin_update_toolchain | 32 ++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/support/functions/_plugin_update_toolchain b/support/functions/_plugin_update_toolchain index f57f9cf..3a94219 100644 --- a/support/functions/_plugin_update_toolchain +++ b/support/functions/_plugin_update_toolchain @@ -3,7 +3,7 @@ #simplebuild_plugin tcupdate tcupdate(){ - pversion="0.22.2"; + pversion="0.22.3"; pname="s3.TUP"; pdesc="Plugin $pname v$pversion"; configname="$configdir/plugin_update_toolchain.config"; @@ -15,7 +15,7 @@ tcupdate(){ andksrcdir="$ctdir/android-ndk"; cpus="$(getconf _NPROCESSORS_ONLN)"; [ -f "$workdir/DEVELOPMENT" ] && disable_syscheck="1" && disable_template_versioning="1"; - s3_update_required=1; + s3_update_required=0; CMDTC="$1"; OPTION1="$2"; @@ -127,19 +127,17 @@ tcupdate(){ #TOOLCHAIN MENU _fill_tc_array; unset MENU_OPTIONS;COUNT=0 - if [ "$systype" == "ok" ];then - if [ "$tcempty" == "0" ];then - for i in "${INST_TCLIST[@]}";do - if [ ! "$i" == "native" ];then - source "$tccfgdir/$i" && tcdate=""; - tcdate=" $(_get_toolchain_date "$i")" && [ "${#tcdate}" -eq 1 ] && tcdate=""; - MENU_OPTIONS+=("$_toolchainname" "$_description\Z2$tcdate\Zn" "${txt_s3tup_menu_toolchain_folder}$tcdir/$i | ${txt_s3tup_menu_toolchain_config}$tccfgdir/$i"); - counter; - fi; - done; - fi; - [ $COUNT -eq 0 ] && MENU_OPTIONS+=("" "$txt_s3tup_menu_toolchain_notfound" "$txt_s3tup_menu_toolchain_notfound"); + if [ "$tcempty" == "0" ];then + for i in "${INST_TCLIST[@]}";do + if [ ! "$i" == "native" ];then + source "$tccfgdir/$i" && tcdate=""; + tcdate=" $(_get_toolchain_date "$i")" && [ "${#tcdate}" -eq 1 ] && tcdate=""; + MENU_OPTIONS+=("$_toolchainname" "$_description\Z2$tcdate\Zn" "${txt_s3tup_menu_toolchain_folder}$tcdir/$i | ${txt_s3tup_menu_toolchain_config}$tccfgdir/$i"); + counter; + fi; + done; fi; + [ $COUNT -eq 0 ] && MENU_OPTIONS+=("" "$txt_s3tup_menu_toolchain_notfound" "$txt_s3tup_menu_toolchain_notfound"); clear;clear; out=$("$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--item-help" "--help-tags" "--default-item" "$tc" "--ok-label" "${txt_s3tup_menu_command_label_update}" "--cancel-label" "${txt_s3tup_menu_command_label_create}" "--help-button" "--help-label" "${txt_s3tup_menu_command_label_backup}" "--extra-button" "--extra-label" "$([ ! "$FLAG" == "1" ] && echo "${txt_s3tup_menu_command_label_exit}" || echo "${txt_s3tup_menu_command_label_back}")" "--title" "-[ ${txt_s3tup_menu_toolchain_title} ]-" \ --menu "\n${txt_s3tup_menu_toolchain_text1} $COUNT ${txt_s3tup_menu_toolchain_text2}\n " \ @@ -1131,7 +1129,7 @@ _get_template_properties(){ rm -f "$fngsrcdir/.config"; else setup=0; - desc="$desc (${txt_s3tup_msg_gtp_info})"; + desc="$desc ($(printf '%q' "${txt_s3tup_msg_gtp_info}"))"; fi;; "ANDK") if [ -d "$andksrcdir" ];then @@ -1144,14 +1142,14 @@ _get_template_properties(){ kernel="Linux" && kernelv="4.9.0"; else setup=0; - desc="$desc (${txt_s3tup_msg_gtp_info})"; + desc="$desc ($(printf '%q' "${txt_s3tup_msg_gtp_info}"))"; fi;; esac; #build template property string [ -z $setup ] && desc="$desc ($arch$cpu$aarch $bitness-bit $endianness, $libc $libcmv$libcv, $cc $ccv, $kernel $kernelv)$props"; fi; - echo "$desc" | xargs; + echo "$desc"; [ -n "$desc" ] && exit 0 || exit 1; }; _get_template_type(){