diff --git a/support/functions/_plugin_update_toolchain b/support/functions/_plugin_update_toolchain index b1b2baa..6c71d8d 100755 --- a/support/functions/_plugin_update_toolchain +++ b/support/functions/_plugin_update_toolchain @@ -1,7 +1,7 @@ #!/bin/bash tcupdate(){ - pversion="0.10.2"; + pversion="0.10.4"; pname="s3.TUP"; pdesc="Plugin $pname v$pversion"; configname="$configdir/plugin_update_toolchain.config"; @@ -47,16 +47,16 @@ tcupdate(){ if [ "$CMDTC" == "-c" ] || [ "$CMDTC" == "--create" ];then #start toolchain builder menu _create_tc "$OPTION1" "" "$FLAG"; - bye; + [ "$FLAG" == "2" ] && return || bye; elif [ "$CMDTC" == "-s" ] || [ "$CMDTC" == "--setup" ];then #setup crosstool-NG _create_tc "" "$CMDTC" "$FLAG"; bye; elif [ "$CMDTC" == "-b" ] || [ "$CMDTC" == "--backup" ];then #backup toolchain if _check_toolchain "$OPTION1";then _backup "$OPTION1" "$OPTION1" >/dev/null; - bye; + [ "$FLAG" == "2" ] && return || bye; else - _nl && exit; + _nl && [ "$FLAG" == "2" ] && sleep 2 && return || exit; fi; elif [ "$CMDTC" == "-d" ] || [ "$CMDTC" == "--duplicate" ];then #duplicate toolchain if _check_toolchain "$OPTION1";then @@ -110,7 +110,7 @@ tcupdate(){ #toolchain native not supported and exists check if ! _check_toolchain $tc;then - [ "$CMDTC" == "" ] && sleep 2 && tcupdate "$CMDTC" "$OPTION1" "$OPTION2" "$FLAG" || _nl && exit; + [ "$CMDTC" == "" ] && sleep 2 && tcupdate "$CMDTC" "$OPTION1" "$OPTION2" "$FLAG" || _nl && [ "$FLAG" == "2" ] && sleep 2 && return || exit; fi; #load toolchain config @@ -133,7 +133,7 @@ tcupdate(){ prefixdir="$PWD" pkg=$(find * | grep -m1 "/pkgconfig") && pkgdir="$prefixdir/$pkg" || pkgdir="$prefixdir"; - backxit=$menu_close; + [ "$FLAG" == "2" ] && backxit=1 || backxit=$menu_close; unset menu_close; while [ ! $menu_close ] do @@ -226,6 +226,7 @@ tcupdate(){ #Reopen previous menu [ ${#OPTION1} -gt 0 ] && exit; + [ "$FLAG" == "2" ] && return; if [ ${#opts} -gt 0 ];then tcupdate "$tc" "$OPTION1" "$OPTION2" "$backxit"; else diff --git a/support/functions/_toolchain b/support/functions/_toolchain index 7111c18..c12db84 100644 --- a/support/functions/_toolchain +++ b/support/functions/_toolchain @@ -3,13 +3,19 @@ _toolchain_build_menu(){ [ "$loadprofile" == "yes" ] && load_config; selected=$( - "$gui" "$st_" "$bt_" "$title_" --no-cancel --title " -[ $txt_bmenu_title ]- " --menu "_________________________________________________________ \n $txt_bmenu_user = $(whoami)\n Toolchain = $_toolchainname\n $txt_bmenu_comp = $_compiler""gcc\n $txt_bmenu_debu = CPU-Threads($(CPUS)) SVN($(REVISION)) SCRIPT($SIMPLEVERSION)\n $txt_bmenu_use = $(echo $USESTRING| sed -e 's/^[ \t]*//')\n _________________________________________________________ \n" 22 65 10 BUILD "$txt_bmenu_build" CONFIGURE "$txt_bmenu_config" LOAD_PROFILE "$txt_bmenu_profile" SAVE_PROFILE "$txt_bmenus_profile" SHOW_BUILDLOG "$txt_bmenu_log" EDIT_CONF_DIR "Oscam config PATH" BACK "$txt_bmenu_back" EXIT "$txt_firstmenu_exit"); + "$gui" "$st_" "$bt_" "$title_" --no-cancel --title " -[ $txt_bmenu_title ]- " --menu "_________________________________________________________ \n $txt_bmenu_user = $(whoami)\n Toolchain = $_toolchainname\n $txt_bmenu_comp = $_compiler""gcc\n $txt_bmenu_debu = CPU-Threads($(CPUS)) SVN($(REVISION)) SCRIPT($SIMPLEVERSION)\n $txt_bmenu_use = $(echo $USESTRING| sed -e 's/^[ \t]*//')\n _________________________________________________________ \n" 22 65 10 BUILD "$txt_bmenu_build" CONFIGURE "$txt_bmenu_config" UPDATE "$txt_bmenu_update" BACKUP "$txt_bmenu_backup" LOAD_PROFILE "$txt_bmenu_profile" SAVE_PROFILE "$txt_bmenus_profile" SHOW_BUILDLOG "$txt_bmenu_log" EDIT_CONF_DIR "Oscam config PATH" BACK "$txt_bmenu_back" EXIT "$txt_firstmenu_exit"); [ $? = 255 ] && _toolchain_build_menu; case $selected in BUILD) _gui_build;; CONFIGURE) _toolchain_config_menu;; + UPDATE) + tcupdate "$_toolchainname" "" "" "2"; + _toolchain_build_menu;; + BACKUP) + tcupdate "-b" "$_toolchainname" "" "2"; + _toolchain_build_menu;; EDIT_CONF_DIR) _gtedit; _toolchain_build_menu;; @@ -65,6 +71,8 @@ _toolchain_main_menu(){ if [ "$systype" == "ok" ];then MENU_OPTIONS+="ADD#$txt_menu_builder2#"; counter; + MENU_OPTIONS+="CREATE#$txt_menu_builder5#"; + counter; [ "$tcempty" == "0" ] && MENU_OPTIONS+="REMOVE#$txt_menu_builder3#" && counter; fi; MENU_OPTIONS+="native#$txt_menu_builder4 $(hostname)-$(uname -m)#"; @@ -94,6 +102,9 @@ _toolchain_main_menu(){ _select_menu;; ADD) _toolchain_add_menu;; + CREATE) + tcupdate "-c" "" "" "2"; + _toolchain_main_menu;; REMOVE) _toolchain_remove_menu;; HELP) diff --git a/support/translation/de b/support/translation/de index 58160ec..f4dae07 100755 --- a/support/translation/de +++ b/support/translation/de @@ -81,6 +81,8 @@ txt_module_configure="oscam Module $txt_sel"; txt_bmenu_use="USE_Variablen "; txt_bmenu_build="oscam jetzt $txt_b1"; txt_bmenu_config="oscam/Build $txt_conf"; + txt_bmenu_update="install/update libraries"; + txt_bmenu_backup="backup toolchain"; txt_bmenu_profile="vorhandenes $txt_profile laden"; txt_bmenus_profile="$txt_profile $txt_save"; txt_bmenu_log="zeige lastbuild.log"; @@ -94,6 +96,7 @@ txt_menu_builder1="Beende simplebuild"; txt_menu_builder2="einen neuen $txt_tc hinzufügen"; txt_menu_builder3="entferne einen installierten $txt_tc"; txt_menu_builder4="Nativ $txt_for"; +txt_menu_builder5="einen neuen $txt_tc erstellen"; txt_menu_back="Zurück zum $txt_tc $txt_menu"; # _dialog_checkout ######################################## diff --git a/support/translation/en b/support/translation/en index 21162a6..16c8151 100755 --- a/support/translation/en +++ b/support/translation/en @@ -70,6 +70,8 @@ txt_module_configure="select oscam modules "; txt_bmenu_use="USE_variables "; txt_bmenu_build="build oscam now"; txt_bmenu_config="oscam/build configuration"; +txt_bmenu_update="install/update libraries"; +txt_bmenu_backup="backup toolchain"; txt_bmenu_log="show lastbuild.log"; txt_bmenu_back="back to toolchain selection"; txt_compress1="filesize before "; @@ -81,6 +83,7 @@ txt_menu_builder1="close simplebuild"; txt_menu_builder2="add new toolchain"; txt_menu_builder3="remove installed toolchain"; txt_menu_builder4="build native for"; +txt_menu_builder5="create new toolchain"; txt_menu_back="back to toolchain menu"; # _dialog_checkout