Fix build script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org>
This commit is contained in:
Willy Sudiarto Raharjo 2014-10-26 00:16:08 +07:00
parent e0e9e7da82
commit 535e6127fb

View file

@ -91,7 +91,7 @@ for dir in \
cd $CSBROOT/$dir || exit 1 cd $CSBROOT/$dir || exit 1
# Get the version # 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 # Get the build
build=$(cat ${package}.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev) build=$(cat ${package}.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev)
@ -108,9 +108,9 @@ for dir in \
# The real build starts here # The real build starts here
sh ${package}.SlackBuild || exit 1 sh ${package}.SlackBuild || exit 1
if [ "$INST" = "1" ]; then if [ "$INST" = "1" ]; then
PACKAGE="${package}-$version-*-${build}*.txz" PACKAGE=`ls $TMP/${package}-${version}-*-${build}*.txz`
if [ -f $TMP/$PACKAGE ]; then if [ -f "$PACKAGE" ]; then
upgradepkg --install-new --reinstall $TMP/$PACKAGE upgradepkg --install-new --reinstall "$PACKAGE"
else else
echo "Error: package to upgrade "$PACKAGE" not found in $TMP" echo "Error: package to upgrade "$PACKAGE" not found in $TMP"
exit 1 exit 1