Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (19 sloc) 763 Bytes
#!/bin/bash
test "$1" = "--verbose" && { VERBOSE=true ; shift ; }
BATCHMODE=""
test "$1" = "--batchmode" && { BATCHMODE="--batchmode" ; shift ; }
DIR_TO_CHECK=$1
DESTINATIONDIR=$2
test -n "$DIR_TO_CHECK" || DIR_TO_CHECK=`pwd`
test -z "$DESTINATIONDIR" -a -d "$DIR_TO_CHECK/.osc" && DESTINATIONDIR="$DIR_TO_CHECK/.osc"
RETURN=0
test "$VERBOSE" = true && echo -n "- checking if all metioned patches are being applied in specfile "
for i in $DIR_TO_CHECK/*.spec ; do
test -f $i || continue
test "$VERBOSE" = true && echo -n "."
RETURN=0
# WARNING only at the moment, just complain loudly ...
/usr/lib/obs/service/source_validators/helpers/check_patches_applied $BATCHMODE $i || RETURN=1
done
test "$VERBOSE" = true && echo "done"
exit $RETURN