From bd88933675f9b0d95b5efc840764be113588e09f Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 30 Mar 2013 14:57:49 +0000 Subject: Check for package BUILD to determine if we need to refresh a compat32 package. --- compat32-tools/massconvert32.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'compat32-tools') diff --git a/compat32-tools/massconvert32.sh b/compat32-tools/massconvert32.sh index 0d81832..5563002 100755 --- a/compat32-tools/massconvert32.sh +++ b/compat32-tools/massconvert32.sh @@ -167,9 +167,11 @@ function conv_pkg () { else FULLPKG=$(get_pkgfullpath $SLACK32ROOT/$PKGPATH) if [ -n "$FULLPKG" ]; then - REPOVERSION=$(basename $FULLPKG |rev |cut -d- -f3 |rev) + REPOVERSION="$(basename $FULLPKG |rev |cut -d- -f3 |rev)" + REPOBLD="$(basename $FULLPKG |rev |cut -d- -f1 |cut -d. -f2- |rev)" else REPOVERSION="" + REPOBLD="" fi fi @@ -181,13 +183,15 @@ function conv_pkg () { # Do we have a local converted package already? HAVE_COMPAT32="$(get_pkgfullpath $TARGET64ROOT/${SERIES}-compat32/$BP-compat32)" if [ -n "$HAVE_COMPAT32" ]; then - COMPAT32VERSION=$(echo "$HAVE_COMPAT32" |rev|cut -d- -f3|rev) - if [ "$COMPAT32VERSION" != "$REPOVERSION" ]; then + COMPAT32VERSION="$(echo "$HAVE_COMPAT32" |rev|cut -d- -f3|rev)" + COMPAT32BLD="$(echo "$HAVE_COMPAT32" |rev|cut -d- -f1|cut -d. -f2-|rev)" + if [ "$COMPAT32VERSION" = "$REPOVERSION" -a "${COMPAT32BLD%compat32}" = "$REPOBLD" ] + then + [ $VERBOSE -eq 1 ] && echo "--- ${BP}-compat32 version '$COMPAT32VERSION' already available" + else echo ">>> Deleting old version '$COMPAT32VERSION' of '${BP}-compat32'" FILE_TO_REMOVE=$HAVE_COMPAT32 HAVE_COMPAT32="" - else - [ $VERBOSE -eq 1 ] && echo "--- ${BP}-compat32 version '$COMPAT32VERSION' already available" fi fi fi -- cgit v1.2.3