diff --git a/support/functions/_plugin_update_toolchain b/support/functions/_plugin_update_toolchain index d609181..56bf0a4 100644 --- a/support/functions/_plugin_update_toolchain +++ b/support/functions/_plugin_update_toolchain @@ -3,7 +3,7 @@ #simplebuild_plugin tcupdate tcupdate(){ - pversion="0.20.2"; + pversion="0.20.3"; pname="s3.TUP"; pdesc="Plugin $pname v$pversion"; configname="$configdir/plugin_update_toolchain.config"; @@ -112,7 +112,7 @@ tcupdate(){ for i in "${INST_TCLIST[@]}";do if [ ! "$i" == "native" ];then source "$tccfgdir/$i" && tcdate=""; - tcdate=" $(_get_toolchain_date "$i")"; + 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; @@ -494,13 +494,13 @@ _create_tc(){ fi; #compress toolchain - _compress "$dldir/Toolchain-$tpl.tar.xz" "$tcdir/$tpl" | "$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--title" " -[ ${txt_s3tup_menu_compress_title} $tpl ${txt_to} Toolchain-$tpl.tar.xz ]- " "$pb_" "$_lines" "$_cols"; + _compress "$dldir/$(decode "$_t1e")$tpl.tar.xz" "$tcdir/$tpl" | "$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--title" " -[ ${txt_s3tup_menu_compress_title} $tpl ${txt_to} $(decode "$_t1e")$tpl.tar.xz ]- " "$pb_" "$_lines" "$_cols"; #create toolchain.cfg props=$(_get_template_properties "$cttpldir/$tpl"); desc=$(echo "$props" | awk -F'^' '{print $1}' | xargs); cflags=$(echo "$props" | awk -F'^' '{print $3}' | xargs); - _create_toolchaincfg "$tcdir/$tpl" "$tpl" "$target" "$sysroot" "" "$desc" "" "$dldir/Toolchain-$tpl.tar.xz" "yes" "$tpl_type_name" "$use" "$cflags" "$tpl_type"; + _create_toolchaincfg "$tcdir/$tpl" "$tpl" "$target" "$sysroot" "" "$desc" "" "$dldir/$(decode "$_t1e")$tpl.tar.xz" "yes" "$tpl_type_name" "$use" "$cflags" "$tpl_type"; else _paktc_timer 10; fi; @@ -560,13 +560,37 @@ _migrations(){ unset tpl; fi; fi; + + #remove 'Toolchain-' from encoded _toolchainfilename + unset mig_list; + for t in "${INST_TCLIST[@]}";do + tc_type="$(_get_toolchain_date "$t" | awk -F'.' '{print $1}' | xargs)"; + if [ ${#tc_type} -gt 0 ]; then + tf=$(grep '^_toolchainfilename=' "$tccfgdir/$t"); + tfn=$(echo "$tf" | awk -F'"' '{print $2}' | xargs); + if [[ $(decode "$tfn") =~ ^$(decode "$_t1e").* ]];then + new_tfn="$(decode "$tfn")" && new_tfn="$(printf ${new_tfn/$(decode "$_t1e")/} | base64)"; + sed -i "s|$tfn|$new_tfn|g" "$tccfgdir/$t"; + new_tf=$(grep '^_toolchainfilename=' "$tccfgdir/$t"); + mig_list+="\n${txt_update} ${p_l}${t}${re_} ${txt_tc} ${txt_conf} ${p_l}$tccfgdir/$t${re_}\n${y_l} - ${tf}${re_}\n${g_l} + ${new_tf}\n${re_}"; + fi; + fi; + done; + + if [ -n "$mig_list" ];then + echo -e "${y_l}MIGRATION -> ${txt_s3tup_msg_cross_migrations_outdated2}${re_}" + echo -e "$mig_list"; + _paktc_timer 5 + fi; + unset t; + }; _backup(){ _sz; # Prepare DIALOG settings src=$1; dest=$2; newtccfgfile="$tccfgdir/$dest"; - xzfile="$dldir/Toolchain-$dest.tar.xz"; + xzfile="$dldir/$(decode "$_t1e")$dest.tar.xz"; ( #compress toolchain @@ -719,7 +743,7 @@ _andk_setup(){ bcl=$(printf '%s\n' "${ANDK_SETUP_tasks[@]}"); sp=$(printf '%*s' 80 | tr ' ' '=') echo -e "$pdesc - ${txt_s3tup_msg_andk_setup_log} - $(date +"%F %T")"; - echo -e "$sp\n${txt_s3tup_msg_andk_setup_commandlist} Android-NDK:\n$sp\ncd "$andksrcdir"\n$(_replace_tokens "$bcl")\n$sp"; + echo -e "$sp\n${txt_s3tup_msg_andk_setup_commandlist} Android-NDK:\n$sp\ncd "$ctdir"\n$(_replace_tokens "$bcl")\n$sp"; sleep 2; if [ $1 -eq 1 ];then @@ -923,7 +947,7 @@ _get_toolchain_libs(){ [ -n "$libs" ] && exit 0 || exit 1; }; _get_toolchain_date(){ - local tc_date="built-in"; + local tc_date; [ -f "$tcdir/$1/build.log.bz2" ] && tc_date="ct-ng.$(date -r "$tcdir/$1/build.log.bz2" "+%F %T")"; [ -f "$tcdir/$1/freetz-ng.log.bz2" ] && tc_date="freetz-ng.$(date -r "$tcdir/$1/freetz-ng.log.bz2" "+%F %T")"; [ -f "$tcdir/$1/android-ndk.log.bz2" ] && tc_date="android-ndk.$(date -r "$tcdir/$1/android-ndk.log.bz2" "+%F %T")"; @@ -1145,7 +1169,7 @@ _check_config(){ [ -z "$S3TUP_CONFIG_VERSION" ] && S3TUP_CONFIG_VERSION=0; if [ $tpl_version -gt $S3TUP_CONFIG_VERSION ];then clear; - echo -e "${r_l}\nCHECK -> ${txt_s3tup_msg_check_config_info1}\n${y_l}${conf}\n${r_l}${txt_s3tup_msg_check_config_info2}\n${y_l}./s3 tcupdate -r\n${re_}"; + echo -e "${r_l}\nCHECK -> ${txt_s3tup_msg_check_config_info1}\n${y_l}${conf}\n${r_l}${txt_s3tup_msg_check_config_info2}\n${y_l}./s3 tcupdate --reset\n${re_}"; _paktc_timer 20; return 1; fi; @@ -1215,6 +1239,7 @@ _androidndkdir="1"; stapi_lib_custom="libwi.a"; stapi_allowed="1";' || andk_vars='_oscamconfdir_custom="";'; + tfn="$(basename "${8/$(decode "$_t1e")/}" | base64)"; #remove 'Toolchain-' from filename before encoding [ "${#5}" -gt 0 ] && lsd="$5" || lsd="/usr/lib"; [ "${#7}" -gt 0 ] && info="$7" || info="$(echo -e "\\\n !!! ${10} Toolchain !!!\\\n @@ -1235,8 +1260,8 @@ _self_build="$([ ! "$9" == "yes" ] && echo "no" || echo "$9")"; _compiler="$3-"; _sysroot="$sysroot"; _libsearchdir="$lsd"; -_toolchainfilename="$(echo -en "$(basename "${8%..*}")" | base64)"; -_md5sum="$(cd "$dldir" && md5sum $(basename "${8%..*}"))"; +_toolchainfilename="$tfn"; +_md5sum="$(cd "$dldir" && md5sum $(basename "$8"))"; _tc_info="$info"; _tc_infolines="5"; EOF diff --git a/support/translation/bg b/support/translation/bg index 2ed72da..043ddbc 100644 --- a/support/translation/bg +++ b/support/translation/bg @@ -137,6 +137,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="The following libraries will txt_s3tup_msg_cross_migrations_renamed="was renamed to" txt_s3tup_msg_cross_migrations_remove="Remove ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="The following cross ${txt_tc}s are out of date due to the renaming of cross ${txt_tc} ${txt_tpl}s:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="You can still use the ${y_l}old cross ${txt_tc}s${re_} from above, but it's better to create new ones based on the ${p_l}new cross ${txt_tc} ${txt_tpl}s${re_} to get future ${txt_tpl} updates.\nThe ${y_l}old cross ${txt_tc}s${re_} can be removed manually as follows:" txt_s3tup_msg_build_library_log="updating ${txt_lib} log" txt_s3tup_msg_build_library_commandlist="build command list for" diff --git a/support/translation/de b/support/translation/de index 7bcfa51..99c5b13 100644 --- a/support/translation/de +++ b/support/translation/de @@ -153,6 +153,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="Die folgenden ${txt_lib}en we txt_s3tup_msg_cross_migrations_renamed="wurde umbenannt in" txt_s3tup_msg_cross_migrations_remove="Lösche ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="Die folgenden Cross ${txt_tc}s sind aufgrund der Umbenennung von Cross ${txt_tc} ${txt_tpl}n veraltet:" +txt_s3tup_msg_cross_migrations_outdated2="Die folgenden ${txt_tc} ${txt_conf}en sind aufgrund der Korrektur einiger Parameter veraltet und werden automatisch korrigiert:" txt_s3tup_msg_cross_migrations_hint="Die ${y_l}alten Cross ${txt_tc}s${re_} von oben können weiterhin verwendet verwenden. Es ist jedoch besser, aktuelle Cross ${txt_tc}s basierend auf den ${p_l}neuen Cross ${txt_tc} ${txt_tpl}n${re_} zu erstellen, um zukünftige Aktualisierungen nachverfolgen zu können.\nDie ${y_l}alten Cross ${txt_tc}s${re_} können wie folgt manuell entfernt werden:" txt_s3tup_msg_build_library_log="Aktualisierung ${txt_lib} Log" txt_s3tup_msg_build_library_commandlist="Befehlszeilen zum Erstellen von" diff --git a/support/translation/en b/support/translation/en index f1537c6..cdad728 100644 --- a/support/translation/en +++ b/support/translation/en @@ -144,6 +144,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="The following libraries will txt_s3tup_msg_cross_migrations_renamed="was renamed to" txt_s3tup_msg_cross_migrations_remove="Remove ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="The following cross ${txt_tc,,}s are out of date due to the renaming of cross ${txt_tc,,} ${txt_tpl,,}s:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="You can still use the ${y_l}old cross ${txt_tc,,}s${re_} from above, but it's better to create new ones based on the ${p_l}new cross ${txt_tc,,} ${txt_tpl,,}s${re_} to get future ${txt_tpl,,} updates.\nThe ${y_l}old cross ${txt_tc,,}s${re_} can be removed manually as follows:" txt_s3tup_msg_build_library_log="updating ${txt_lib,,} log" txt_s3tup_msg_build_library_commandlist="build command list for" diff --git a/support/translation/es b/support/translation/es index 26ee492..2857085 100644 --- a/support/translation/es +++ b/support/translation/es @@ -132,6 +132,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="The following libraries will txt_s3tup_msg_cross_migrations_renamed="was renamed to" txt_s3tup_msg_cross_migrations_remove="Remove ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="The following cross ${txt_tc}s are out of date due to the renaming of cross ${txt_tc} ${txt_tpl}s:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="You can still use the ${y_l}old cross ${txt_tc}s${re_} from above, but it's better to create new ones based on the ${p_l}new cross ${txt_tc} ${txt_tpl}s${re_} to get future ${txt_tpl} updates.\nThe ${y_l}old cross ${txt_tc}s${re_} can be removed manually as follows:" txt_s3tup_msg_build_library_log="updating ${txt_lib} log" txt_s3tup_msg_build_library_commandlist="build command list for" diff --git a/support/translation/fr b/support/translation/fr index 0e669ff..e03d4fc 100644 --- a/support/translation/fr +++ b/support/translation/fr @@ -184,6 +184,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="The following libraries will txt_s3tup_msg_cross_migrations_renamed="was renamed to" txt_s3tup_msg_cross_migrations_remove="Remove ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="The following cross ${txt_tc}s are out of date due to the renaming of cross ${txt_tc} ${txt_tpl}s:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="You can still use the ${y_l}old cross ${txt_tc}s${re_} from above, but it's better to create new ones based on the ${p_l}new cross ${txt_tc} ${txt_tpl}s${re_} to get future ${txt_tpl} updates.\nThe ${y_l}old cross ${txt_tc}s${re_} can be removed manually as follows:" txt_s3tup_msg_build_library_log="updating ${txt_lib} log" txt_s3tup_msg_build_library_commandlist="build command list for" diff --git a/support/translation/it b/support/translation/it index a631ecf..a18022b 100644 --- a/support/translation/it +++ b/support/translation/it @@ -211,6 +211,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="The following libraries will txt_s3tup_msg_cross_migrations_renamed="was renamed to" txt_s3tup_msg_cross_migrations_remove="Remove ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="The following cross ${txt_tc}s are out of date due to the renaming of cross ${txt_tc} ${txt_tpl}s:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="You can still use the ${y_l}old cross ${txt_tc}s${re_} from above, but it's better to create new ones based on the ${p_l}new cross ${txt_tc} ${txt_tpl}s${re_} to get future ${txt_tpl} updates.\nThe ${y_l}old cross ${txt_tc}s${re_} can be removed manually as follows:" txt_s3tup_msg_build_library_log="updating ${txt_lib} log" txt_s3tup_msg_build_library_commandlist="build command list for" diff --git a/support/translation/nl b/support/translation/nl index cbe8985..3e13e3b 100644 --- a/support/translation/nl +++ b/support/translation/nl @@ -147,6 +147,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="The following libraries will txt_s3tup_msg_cross_migrations_renamed="was renamed to" txt_s3tup_msg_cross_migrations_remove="Remove ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="The following cross ${txt_tc}s are out of date due to the renaming of cross ${txt_tc} ${txt_tpl}s:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="You can still use the ${y_l}old cross ${txt_tc}s${re_} from above, but it's better to create new ones based on the ${p_l}new cross ${txt_tc} ${txt_tpl}s${re_} to get future ${txt_tpl} updates.\nThe ${y_l}old cross ${txt_tc}s${re_} can be removed manually as follows:" txt_s3tup_msg_build_library_log="updating ${txt_lib} log" txt_s3tup_msg_build_library_commandlist="build command list for" diff --git a/support/translation/pl b/support/translation/pl index 18a5913..35da21f 100644 --- a/support/translation/pl +++ b/support/translation/pl @@ -147,6 +147,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="The following libraries will txt_s3tup_msg_cross_migrations_renamed="was renamed to" txt_s3tup_msg_cross_migrations_remove="Remove ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="The following cross ${txt_tc}s are out of date due to the renaming of cross ${txt_tc} ${txt_tpl}s:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="You can still use the ${y_l}old cross ${txt_tc}s${re_} from above, but it's better to create new ones based on the ${p_l}new cross ${txt_tc} ${txt_tpl}s${re_} to get future ${txt_tpl} updates.\nThe ${y_l}old cross ${txt_tc}s${re_} can be removed manually as follows:" txt_s3tup_msg_build_library_log="updating ${txt_lib} log" txt_s3tup_msg_build_library_commandlist="build command list for" diff --git a/support/translation/pt b/support/translation/pt index 90af678..b8c7dbc 100644 --- a/support/translation/pt +++ b/support/translation/pt @@ -184,6 +184,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="The following libraries will txt_s3tup_msg_cross_migrations_renamed="was renamed to" txt_s3tup_msg_cross_migrations_remove="Remove ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="The following cross ${txt_tc}s are out of date due to the renaming of cross ${txt_tc} ${txt_tpl}s:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="You can still use the ${y_l}old cross ${txt_tc}s${re_} from above, but it's better to create new ones based on the ${p_l}new cross ${txt_tc} ${txt_tpl}s${re_} to get future ${txt_tpl} updates.\nThe ${y_l}old cross ${txt_tc}s${re_} can be removed manually as follows:" txt_s3tup_msg_build_library_log="updating ${txt_lib} log" txt_s3tup_msg_build_library_commandlist="build command list for" diff --git a/support/translation/tr b/support/translation/tr index 9b10094..19a3396 100644 --- a/support/translation/tr +++ b/support/translation/tr @@ -150,6 +150,7 @@ txt_s3tup_msg_cross_toolchain_library_integration="Devamındaki ${txt_lib}en olu txt_s3tup_msg_cross_migrations_renamed="dosya adi degistirildi yeni dosya adi" txt_s3tup_msg_cross_migrations_remove="sil ${txt_tc}" txt_s3tup_msg_cross_migrations_outdated="Devamındaki Cross ${txt_tc}s Cross adını değiştiriyor ${txt_tc} ${txt_tpl}n eski:" +txt_s3tup_msg_cross_migrations_outdated2="The following ${txt_tc,,} ${txt_conf}s are out of date due to the correction of some parameters and are corrected automatically:" txt_s3tup_msg_cross_migrations_hint="bu ${y_l}eski Cross ${txt_tc}s${re_} yukardakini daha kullanabilirsiniz. Ancak, daha iyi, bugünkü Cross ${txt_tc}s buna bagli oglan ${p_l}yeni Cross ${txt_tc} ${txt_tpl}n${re_} gelecekteki güncellemeler oluşturmak için.\nbu ${y_l}eski Cross ${txt_tc}s${re_} manuel olarak aşağıdaki gibi çıkarılabilir:" txt_s3tup_msg_build_library_log="Güncelleştirme ${txt_lib} Log" txt_s3tup_msg_build_library_commandlist="komut oluşturmak itibaren"