#!/bin/sh

#
# Script: find-BUILDnums
# Purpose: Find the package BUILD numbers in the KDE build scripts
#          for Slackware ARM.  If some packages have been updated out of the main
#          build cycle (eg for security fixes), then the BUILD will have been
#          bumped.  We need to check that they are set to 1 for a KDE upgrade.
# Author:  Stuart Winter <mozes@slackware.com>
# Date:    11-05-2010
#

find . -type d -mindepth 1 -maxdepth 1 \! \( -name EXCLUDE -o -name arm -o -name orig \) -prune -print0 | xargs -0i fgrep -H BUILD= {}/arm/build | egrep -v "=1|-1"

# Find packages which are independent of the KDE build number:
# find . -path './*/arm*' -name build -type f -print0 | xargs -0 egrep "BUILD=[0-9]"

# Bump build numbers - useful if I rebuilt everything but forgot to change
# the BUILD value in the build scripts.
# find . -name '*tgz' | while read line ; do
#  mv -fv $line $( echo $line | rev  | cut -d- -f2- | rev )-5.tgz
#done

