From 06c1a1d5441712955f23c24f99e5879d34f03ba3 Mon Sep 17 00:00:00 2001 From: WXbet <57314510+WXbet@users.noreply.github.com> Date: Sat, 28 Mar 2020 21:01:39 +0100 Subject: [PATCH] s3.TUP cleanup build directory (v0.11.5) Remove temporary toolchain build directory after successful build to save disk space --- support/functions/_plugin_update_toolchain | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/support/functions/_plugin_update_toolchain b/support/functions/_plugin_update_toolchain index 97ec033..8847078 100644 --- a/support/functions/_plugin_update_toolchain +++ b/support/functions/_plugin_update_toolchain @@ -3,7 +3,7 @@ #simplebuild_plugin tcupdate tcupdate(){ - pversion="0.11.4"; + pversion="0.11.5"; pname="s3.TUP"; pdesc="Plugin $pname v$pversion"; configname="$configdir/plugin_update_toolchain.config"; @@ -348,7 +348,11 @@ _create_tc(){ if [ ! $err -gt 0 ]; then #get target from build.log target=$(sed -n -e '/target = / s/.*\= *//p' "$ctsrcdir/build.log"); - + + #get CT_BUILD_TOP_DIR aka temporary toolchain build directory from build.log and delete it to save disk space + buildtopdir=$(sed -n -e '/CT_BUILD_TOP_DIR=\// s/.*\= *//p' "$ctsrcdir/build.log"); + [ -d "$buildtopdir" ] && rm -rf "$buildtopdir" 2>/dev/null; + #compress toolchain _compress "$dldir/Toolchain-$tpl.tar.xz" "$tcdir/$tpl" | "$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--title" " -[ Compress cross toolchain $tpl to Toolchain-$tpl.tar.xz ]- " "$pb_" "$_lines" "$_cols";