Meta/DoKernelOrg: modernize a bit
[git/spearce.git] / DoKernelOrg
blobb04e3d382c20bd99878e36ed77d11046bda70215
1 #!/bin/sh
3 : ${J='-l 4 -j'}
4 G=/pub/software/scm/git &&
6 HERE=$(git symbolic-ref HEAD) || exit 1
7 THIS=$(git describe HEAD)
9 rm -f version
10 case `hostname` in
11 hera.kernel.org)
12 narch='x86_64 i386'
13 arch=x86_64 ;;
14 wing-fc*|fc*.siamese.dyndns.org)
15 eval $(rpm --showrc | sed -ne '
16 s/^-14: dist[ ]*\./dist=/p
17 s/^-14: _build_arch[ ]*/arch=/p
18 ') &&
19 test -n "$dist" && test -n "$arch" || exit 1
21 *) echo >&2 "What are you talking about???"
22 exit 1 ;;
23 esac &&
24 : >./:all.log &&
25 echo "* Building $THIS" &&
26 make $J git >./:all.log 2>&1 &&
27 V=`./git --version | sed -e 's/git version //'` &&
28 make rpm >>./:all.log 2>&1 &&
29 case "$narch" in
30 '')
31 # This is not the primary build machine.
32 status=$?
33 case "$status" in
35 echo >&2 "Done -- move RPMS to the master machine."
37 cd "$HOME/rpms/" &&
38 tar cf "TARBALL/$V.$arch.$dist.tar" \
39 RPMS/$arch/*-$V-*.$dist.$arch.rpm &&
40 ls -ld $HOME/rpms/TARBALL/$V.$arch.$dist.tar
41 ) &&
42 make clean
45 echo >&2 "Failed with status $status"
47 esac
48 exit $status ;;
50 make dist-doc >>./:all.log 2>&1 &&
51 ln -f git-$V.tar.gz $G/. &&
52 ln -f git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz $G/.
54 esac >>./:all.log 2>&1 &&
55 case "$V" in
56 *.rc[0-9]* | *-rc[0-9]*)
57 mkdir -p $G/testing &&
58 for a in $narch
60 for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
62 test -f "$rr" || continue
63 ln -f "$rr" $G/testing/.
64 done
65 done &&
66 ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/testing/.
69 mkdir -p $G/RPMS/$arch $G/RPMS/SRPMS &&
70 for a in $narch
72 mkdir -p "$G/RPMS/$a" &&
73 for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
75 test -f "$rr" || continue
76 ln -f "$rr" $G/RPMS/$a/.
77 done
78 done &&
79 ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/RPMS/SRPMS/. &&
81 # I do not know how it exits, and I do not care much.
82 for a in $narch
84 /usr/local/bin/yummy $G/RPMS/$a
85 done
86 /usr/local/bin/yummy $G/RPMS/SRPMS
88 } >>./:all.log 2>&1 ;;
89 esac &&
90 make clean