Don't run with --keepgoing.
[fedora-mingw.git] / build-everything-in-mock.sh
1 #!/bin/bash -
2
3 # These are the packages we don't want to build yet:
4 nobuild=$(grep -v '^#' IGNORE)
5
6 # Keep going (not safe).  Comment out for a safe build.
7 #keepgoing=--keepgoing
8
9 rm -f */*.src.rpm
10
11 # If any extra SRPMS need to be considered, list them here.  Otherwise
12 # leave this empty.
13 srpms=""
14
15 for dir in *; do
16     if ! echo "$nobuild" | grep -sq "^$dir\$"; then
17         if [ -d $dir -a -f $dir/*.spec ]; then
18                 if ! rpmbuild -bs --define "_sourcedir $(pwd)/$dir" --define "_srcrpmdir $(pwd)/$dir" $dir/*.spec; then
19                   echo "Failed to create a source RPM in directory $dir."
20                   echo "If you want to ignore this directory, you should add"
21                   echo "it to the IGNORE file in the top level directory."
22                   exit 1
23                 fi
24                 srpms="$srpms $(pwd)/$dir/*.src.rpm"
25         fi
26     fi
27 done
28
29 smock/smock.pl \
30   --arch=i386 \
31   --arch=x86_64 \
32   --distro=fedora-rawhide \
33   --distro=fedora-10 \
34   $keepgoing \
35   $srpms