From 33774b0fcfebdfa2dbfae2d6432a602c79dac59c Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Fri, 11 Apr 2014 10:37:15 +0700 Subject: [PATCH] Update build script. Adapted from CSB project Signed-off-by: Willy Sudiarto Raharjo --- mate-build-base.sh | 5 ++++- mate-build-extra.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mate-build-base.sh b/mate-build-base.sh index 3d0f587..249f393 100755 --- a/mate-build-base.sh +++ b/mate-build-base.sh @@ -72,6 +72,9 @@ for dir in \ # Get the version version=$(cat ${package}.SlackBuild | grep "VERSION:" | 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)" if [ $sourcefile -gt 1 ]; then @@ -84,7 +87,7 @@ for dir in \ # The real build starts here sh ${package}.SlackBuild || exit 1 if [ "$INST" = "1" ]; then - PACKAGE="${package}-$version-*.txz" + PACKAGE="${package}-$version-${build}*.txz" if [ -f $TMP/$PACKAGE ]; then upgradepkg --install-new --reinstall $TMP/$PACKAGE else diff --git a/mate-build-extra.sh b/mate-build-extra.sh index 88f9125..d682d83 100755 --- a/mate-build-extra.sh +++ b/mate-build-extra.sh @@ -86,6 +86,9 @@ for dir in \ # Get the version version=$(cat ${package}.SlackBuild | grep "VERSION:" | 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)" if [ $sourcefile -gt 1 ]; then @@ -98,7 +101,7 @@ for dir in \ # The real build starts here sh ${package}.SlackBuild || exit 1 if [ "$INST" = "1" ]; then - PACKAGE="${package}-$version-*.txz" + PACKAGE="${package}-$version-${build}*.txz" if [ -f $TMP/$PACKAGE ]; then upgradepkg --install-new --reinstall $TMP/$PACKAGE else