From 867f44e4b93d8eb645e65a2f793205ef7b785e7f Mon Sep 17 00:00:00 2001 From: "chess.griffin" Date: Fri, 29 Aug 2008 01:18:27 +0000 Subject: [PATCH] add ability to have the build process take place in a terminal instead of the dialog interface by setting a new variable, TERMBUILD=YES in sbopkg.conf; TERMBUILD will be set to NO as a default when packages; many thanks to Erik Hanson for raising this issue and providing patches and code to make it work. --- src/etc/sbopkg/sbopkg.conf.new | 1 + src/usr/bin/sbopkg | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/etc/sbopkg/sbopkg.conf.new b/src/etc/sbopkg/sbopkg.conf.new index 51d34b3..836a6c8 100644 --- a/src/etc/sbopkg/sbopkg.conf.new +++ b/src/etc/sbopkg/sbopkg.conf.new @@ -13,6 +13,7 @@ LOCALREPO=${LOCALREPO:-/home/sbo} SRCDIR=${SRCDIR:-/var/cache/sbopkg} export TMP=${TMP:-/tmp/SBo} KEEPLOG=YES +TERMBUILD=YES # Optional - the $OUTPUT variable is used by SlackBuild scripts only # and can be used to change the output location of compiled packages. diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index 9a2da00..bbee506 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -464,11 +464,16 @@ as the root user in order to build packages." 8 30 fi rm -rf $TMP/sbopkg_build.lck touch $TMP/sbopkg_build.lck - ( build_package $APP >> $SBOPKGOUTPUT & ) 2>>$SBOPKGOUTPUT - while [ -f $TMP/sbopkg_build.lck ]; do - dialog --backtitle "Building the $APP package." \ + if [ "$TERMBUILD" = "YES" ]; then + build_package $APP | tee $SBOPKGOUTPUT + read -n 1 -p "Press any key to continue." + else + ( build_package $APP >> $SBOPKGOUTPUT & ) 2>>$SBOPKGOUTPUT + while [ -f $TMP/sbopkg_build.lck ]; do + dialog --backtitle "Building the $APP package." \ --tailbox $SBOPKGOUTPUT 20 70 - done + done + fi if [ "$KEEPLOG" = "YES" ]; then cat $SBOPKGOUTPUT >> $TMP/sbopkg-build-log fi