@ -3,7 +3,7 @@
#simplebuild_plugin tcupdate
#simplebuild_plugin tcupdate
tcupdate(){
tcupdate(){
pversion="0.11.3 ";
pversion="0.11.4 ";
pname="s3.TUP";
pname="s3.TUP";
pdesc="Plugin $pname v$pversion";
pdesc="Plugin $pname v$pversion";
configname="$configdir/plugin_update_toolchain.config";
configname="$configdir/plugin_update_toolchain.config";
@ -17,7 +17,7 @@ tcupdate(){
[ -z "$4" ] && FLAG="0" || FLAG="$4"; #1 - tcupdate call from s3 main menu, 2 - tcupdate call from s3 toolchain menu;
[ -z "$4" ] && FLAG="0" || FLAG="$4"; #1 - tcupdate call from s3 main menu, 2 - tcupdate call from s3 toolchain menu;
tc="$CMDTC";
tc="$CMDTC";
clear && _check_bin ;
clear && _check_pkg ;
#backup config
#backup config
if [ "$CMDTC" == "-r" ] || [ "$CMDTC" == "--reset" ];then
if [ "$CMDTC" == "-r" ] || [ "$CMDTC" == "--reset" ];then
@ -179,7 +179,7 @@ tcupdate(){
[ $COUNT -eq 0 ] && MENU_OPTIONS+=("" "no libraries found" "no libraries found") && counter;
[ $COUNT -eq 0 ] && MENU_OPTIONS+=("" "no libraries found" "no libraries found") && counter;
if [ ${#OPTION1} -gt 0 ];then #Force build library call
if [ ${#OPTION1} -gt 0 ];then #Force build library call
opts=$(echo "$OPTION1" | tr ',' "\n" );
opts=$(echo "$OPTION1" | tr ',' '\n' );
ret="0";
ret="0";
else
else
clear;clear;
clear;clear;
@ -308,7 +308,7 @@ _create_tc(){
clear;
clear;
sp=$(printf '%*s' 80 | tr ' ' '=')
sp=$(printf '%*s' 80 | tr ' ' '=')
echo -e "$sp\nbuild ($i/$icount): command list for cross toolchain $tpl:\n$sp" | tee -a "$logfile";
echo -e "$y_l$ sp\nbuild ($i/$icount): command list for cross toolchain $tpl:\n$sp" | tee -a "$logfile";
#copy template and patching them
#copy template and patching them
echo "rm \"$ctsrcdir/.config\"* 2>/dev/null;cp --no-preserve=mode,ownership -f \"$cttpldir/$tpl\" \"$ctsrcdir/.config\";" | tee -a "$logfile";
echo "rm \"$ctsrcdir/.config\"* 2>/dev/null;cp --no-preserve=mode,ownership -f \"$cttpldir/$tpl\" \"$ctsrcdir/.config\";" | tee -a "$logfile";
@ -326,11 +326,13 @@ _create_tc(){
#run build
#run build
bcl=$(printf '%s\n' "${CTNG_BUILD_tasks[@]}");
bcl=$(printf '%s\n' "${CTNG_BUILD_tasks[@]}");
echo -e "cd \"$ctsrcdir\";\n$(_replace_tokens "$bcl")\n$sp" | tee -a "$logfile";
echo -e "cd \"$ctsrcdir\";\n$(_replace_tokens "$bcl")\n$sp""$re_" | tee -a "$logfile";
sleep 2;
sleep 2;
if [ $START_BUILD -eq 1 ]; then
if [ $START_BUILD -eq 1 ]; then
cd "$ctsrcdir";
cd "$ctsrcdir";
#print out crosstool-NG version
echo -e "$g_l\n$(./ct-ng | grep 'crosstool-NG version' &2>/dev/null | tail -1)\n""$re_" | tee -a "$logfile";
#generate build command list
#generate build command list
unset buildtasks;
unset buildtasks;
for task in "${CTNG_BUILD_tasks[@]}";do
for task in "${CTNG_BUILD_tasks[@]}";do
@ -629,22 +631,14 @@ _check_lib(){
*) echo "not implemented yet!";
*) echo "not implemented yet!";
esac;
esac;
};
};
_check_bin(){
_check_pkg(){
pkgs=( git patch curl jq gcc g++ gperf bison flex makeinfo help2man make file cmp \
bins=( git curl jq gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \
python3-config autoconf automake libtoolize libtool gawk wget bzip2 xz unzip rsync );
python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \
headers=( ncurses );
patch libstdc++6 rsync );
libs=( libstdc++.so.6 );
failed=0;
if syscheck "" "" "${pkgs[*]}" "${headers[*]}" "${libs[*]}";then
for e in "${bins[@]}";
echo -e "$r_l""\nCHECK -> You need to manually install the following packages to use this plugin properly:\n"$y_l"$prefix apt install$packages\n""$re_" && _paktc_timer 10;
do
dpkg -s "$e" &>/dev/null;
if [ ! "$?" -eq "0" ];then
packages="$packages $e";
failed=1;
fi;
fi;
done;
[ "$failed" == 1 ] && echo -e "$r_l""\nCHECK -> You need to install the following tools to use this plugin properly:\n"$y_l"apt install$packages\n""$re_" && _paktc_timer 10;
return $failed;
};
};
_check_config(){
_check_config(){
nok=0;
nok=0;