diff --git a/testing/mate-build-testing.sh b/testing/mate-build-testing.sh index e7c2ab4..dd06f4b 100644 --- a/testing/mate-build-testing.sh +++ b/testing/mate-build-testing.sh @@ -51,7 +51,10 @@ for dir in \ cd $MSBROOT/$dir || exit 1 # Get the version - version=$(cat ${package}.SlackBuild | grep "VERSION:" | cut -d "-" -f2 | rev | cut -c 2- | rev) + version=$(cat ${package}.SlackBuild | grep "VERSION:" | head -n1 | cut -d "-" -f2 | rev | cut -c 2- | rev) + + # Get the build + build=$(cat ${package}.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev) # Check for duplicate sources sourcefile="$(ls -l $MSBROOT/$dir/${package}-*.tar.?z* | wc -l)" @@ -62,12 +65,12 @@ for dir in \ exit 1 fi - # The real builds starts here + # The real build starts here sh ${package}.SlackBuild || exit 1 if [ "$INST" = "1" ]; then - PACKAGE="${package}-$version-*.txz" - if [ -f $TMP/$PACKAGE ]; then - upgradepkg --install-new --reinstall $TMP/$PACKAGE + PACKAGE=`ls $TMP/${package}-${version}-*-${build}*.txz` + if [ -f "$PACKAGE" ]; then + upgradepkg --install-new --reinstall "$PACKAGE" else echo "Error: package to upgrade "$PACKAGE" not found in $TMP" exit 1