What's in/cooking updates
[git/spearce.git] / DoKernelOrg
blob3fbfe5e0642547261d7f063685e8e3735407b415
1 #!/bin/sh
3 case "`uname -m 2>/dev/null`" in
4 x86_64)
5 USE_PIC=YesPlease
6 export USE_PIC
7 ;;
8 esac
10 : ${J='-l 4 -j'}
11 G=/pub/software/scm/git &&
13 cd $HOME/git &&
14 make clean >/dev/null 2>&1 &&
15 git reset --hard &&
16 make clean >/dev/null 2>&1 &&
17 git checkout master &&
18 make clean >/dev/null 2>&1 &&
20 case "$(asciidoc --version 2>&1)" in
21 asciidoc' 8'.*)
22 ASCIIDOC8=YesPlease
23 export ASCIIDOC8 ;;
24 esac
26 case "$1" in
27 '')
28 echo "* Building all"
29 : ${branches='next master maint pu'}
30 nstalled=install
31 for branch in $branches
33 if git rev-parse --verify refs/heads/$branch 2>/dev/null
34 then
35 echo "** $branch **" &&
36 git checkout $branch &&
37 make $J $nstalled &&
38 make test &&
39 make clean &&
40 nstalled=all || exit $?
41 else
42 echo
43 echo "* NO $branch"
44 echo
46 done >:all.log 2>&1
49 maint | maint-* | master)
50 rm -f version
51 case `hostname` in
52 hera.kernel.org)
53 narch='x86_64 i386'
54 arch=x86_64 ;;
55 wing-fc?|kunrun-vmw-fc5)
56 arch=i386 ;;
57 *) echo >&2 "What are you talking about???"
58 exit 1 ;;
59 esac &&
60 : >./:all.log &&
61 echo "* Building $1" &&
62 git checkout "$1" &&
63 make $J git >./:all.log 2>&1 &&
64 V=`./git --version | sed -e 's/git version //'` &&
65 make rpm >>./:all.log 2>&1 &&
66 case "$narch" in
67 '')
68 # This is not the primary build machine.
69 status=$?
70 case "$status" in
72 echo >&2 "Done -- move RPMS to the master machine."
74 cd "$HOME/rpms/" &&
75 tar cf "$HOME/$V.tar" \
76 RPMS/$arch/*-$V-*.$arch.rpm &&
77 ls -ld $HOME/$V.tar
79 make clean
82 echo >&2 "Failed with status $status"
84 esac
85 exit $status ;;
87 make dist-doc >>./:all.log 2>&1 &&
88 ln -f git-$V.tar.gz $G/. &&
89 ln -f git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz $G/.
91 esac >>./:all.log 2>&1 &&
92 case "$V" in
93 *.rc[0-9]* | *-rc[0-9]*)
94 mkdir -p $G/testing &&
95 for a in $narch
97 for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
99 test -f "$rr" || continue
100 ln -f "$rr" $G/testing/.
101 done
102 done &&
103 ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/testing/.
106 mkdir -p $G/RPMS/$arch $G/RPMS/SRPMS &&
107 for a in $narch
109 mkdir -p "$G/RPMS/$a" &&
110 for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
112 test -f "$rr" || continue
113 ln -f "$rr" $G/RPMS/$a/.
114 done
115 done &&
116 ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/RPMS/SRPMS/. &&
118 # I do not know how it exits, and I do not care much.
119 for a in $narch
121 /usr/local/bin/yummy $G/RPMS/$a
122 done
123 /usr/local/bin/yummy $G/RPMS/SRPMS
125 } >>./:all.log 2>&1 ;;
126 esac &&
127 make clean &&
129 : ;;
130 esac || exit $?
132 git checkout master