Update Build Script. Fix #2

Thanks to Mick Amadio.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org>
This commit is contained in:
Willy Sudiarto Raharjo 2014-04-12 15:35:10 +07:00
parent 93eaaa77cc
commit d07cf86c22

View file

@ -84,10 +84,10 @@ for dir in \
cinnamon-screensaver \
; do
# Get the package name
package=$(echo $dir | cut -f2- -d /)
package=$(echo $dir | cut -f2- -d /)
# Change to package directory
cd $CSBROOT/$dir || exit 1
cd $CSBROOT/$dir || exit 1
# Get the version
version=$(cat ${package}.SlackBuild | grep "VERSION:" | cut -d "-" -f2 | rev | cut -c 2- | rev)
@ -103,11 +103,11 @@ for dir in \
echo "Please delete sources other than ${package}-$version to avoid problems"
exit 1
fi
# The real build starts here
sh ${package}.SlackBuild || exit 1
if [ "$INST" = "1" ]; then
PACKAGE="${package}-$version-${build}*.txz"
PACKAGE="${package}-$version-*-${build}*.txz"
if [ -f $TMP/$PACKAGE ]; then
upgradepkg --install-new --reinstall $TMP/$PACKAGE
else
@ -115,7 +115,7 @@ for dir in \
exit 1
fi
fi
# back to original directory
cd $CSBROOT
done