]> TLD Linux GIT Repositories - packages/rpm-build-tools.git/commitdiff
- add a nice output for what to install
authorBartosz Świątek <shadzik@tld-linux.org>
Tue, 4 Oct 2011 23:11:52 +0000 (01:11 +0200)
committerBartosz Świątek <shadzik@tld-linux.org>
Tue, 4 Oct 2011 23:11:52 +0000 (01:11 +0200)
  this is a very useful feature IMO

builder

diff --git a/builder b/builder
index 726ac295597067ee7f02e5f1e398585a4ddef345..f1d81ba89178a973c8802d0e2c3574d86ee9ea0e 100755 (executable)
--- a/builder
+++ b/builder
@@ -1485,7 +1485,8 @@ build_package() {
                        fi
                fi
        else
-               eval ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $SPECFILE
+               BRLISTFILE=$(tempfile)
+               eval ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $SPECFILE 2>$BRLISTFILE
                RETVAL=$?
        fi
        if [ "$RETVAL" -ne "0" ]; then
@@ -1497,6 +1498,17 @@ build_package() {
                        fi
                        echo ""
                fi
+               # try to nicely show package list, to just copy&paste it to poldek or so...
+               cat $BRLISTFILE
+               BRLIST=$(awk 'BEGIN{ORS=" ";} NR>1 {print $1;}' $BRLISTFILE)
+               echo
+               echo "To install packages type:"
+               echo "poldek -ivh $BRLIST"
+               echo
+               echo "In poldek, copy these command:"
+               echo "install $BRLIST"
+               echo
+               rm $BRLISTFILE
                Exit_error err_build_fail
        fi
        unset BUILD_SWITCH