From 535e6127fb1b4203c8419001822e1b88494e9b88 Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Sun, 26 Oct 2014 00:16:08 +0700 Subject: [PATCH] Fix build script. Signed-off-by: Willy Sudiarto Raharjo --- build-cinnamon.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build-cinnamon.sh b/build-cinnamon.sh index 73caf83..0f2fedb 100755 --- a/build-cinnamon.sh +++ b/build-cinnamon.sh @@ -91,7 +91,7 @@ for dir in \ cd $CSBROOT/$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) @@ -108,9 +108,9 @@ for dir in \ # The real build starts here sh ${package}.SlackBuild || exit 1 if [ "$INST" = "1" ]; then - PACKAGE="${package}-$version-*-${build}*.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