Move IGNORE (list of ignored packages) into a separate file.
[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 rm -f */*.src.rpm
7
8 # If any extra SRPMS need to be considered, list them here.  Otherwise
9 # leave this empty.
10 srpms=""
11
12 for dir in *; do
13     if ! echo "$nobuild" | grep -sq "^$dir\$"; then
14         if [ -d $dir -a -f $dir/*.spec ]; then
15                 if ! rpmbuild -bs --define "_sourcedir $(pwd)/$dir" --define "_srcrpmdir $(pwd)/$dir" $dir/*.spec; then
16                   echo "Failed to create a source RPM in directory $dir."
17                   echo "If you want to ignore this directory, you should add"
18                   echo "it to the 'nobuild' list in this script."
19                   exit 1
20                 fi
21                 srpms="$srpms $(pwd)/$dir/*.src.rpm"
22         fi
23     fi
24 done
25
26 smock/smock.pl --arch=i386 --arch=x86_64 --distro=fedora-10 $srpms