build-script: Syncronize with base and extra.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org>
This commit is contained in:
Willy Sudiarto Raharjo 2015-02-04 01:27:38 +07:00
parent 8ce8fb8b49
commit 005321e6b2

View file

@ -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