3 exec 3>&2 >./:all.log 2>&1
6 ln -f "$@" || cp -f "$@"
9 STAGE= narch= arch= master= jobs= rpm=t final= clean_stage=
10 G=/pub/software/scm/git
11 THIS=$(git describe HEAD)
13 while case "$1" in -*) ;; *) break ;; esac
20 --stage=?*) STAGE=${1#--stage=} ;;
21 --clean-stage) clean_stage=t ;;
23 --pub=?*) G=${1#--pub=} ;;
24 *) echo >&3 "Eh? $1"; exit 1 ;;
29 while test -n "$STAGE" && test "$STAGE" != "${STAGE%/}"
34 if test -n "$clean_stage" && test -d "$STAGE/$G"
36 echo -n "Remove $STAGE/$G [y/N]? "
41 mkdir -p "$STAGE/$G" || exit ;;
43 echo "Not removing, then"
51 hera.kernel.org) master=t ;;
58 narch='x86_64 i386 i686'
69 echo >&3 "'--dist-only' only makes sense on the master machine"
74 echo >&3 "'--final' only makes sense on the master machine"
79 eval $(rpm --showrc | sed -ne '
80 s/^-14: dist[ ]*\./dist=/p
81 s/^-11= _target_cpu[ ]*/arch=/p
82 ') && test -n "$dist" && test -n "$arch" || exit 1
85 MAN_BASE_URL="http://www.kernel.org/pub/software/scm/git/docs/"
86 ASCIIDOC_NO_ROFF=YesPlease
93 echo "* Building $THIS"
96 V=`./git --version | sed -e 's/git version //'` || exit
98 make $jobs dist || exit
102 NEEDS_CRYPTO_WITH_SSL=YesPlease make $jobs $d rpm || exit
105 if test t != "$master"
109 tar cf "TARPIT/$V.$arch.$dist.tar" \
110 RPMS/$arch/*-$V-*.$dist.$arch.rpm &&
111 ls -ld $HOME/rpms/TARPIT/$V.$arch.$dist.tar
114 echo >&2 "Done -- move RPMS to the master machine."
115 echo >&2 "scp $HOME/rpms/TARPIT/$V.$arch.$dist.tar master.kernel.org:rpms/TARPIT"
116 echo >&2 "sha1sum -c <<\EOF"
117 (cd $HOME/rpms && sha1sum TARPIT/$V.$arch.$dist.tar) >&2
122 make $jobs $d dist-doc || exit
124 mkdir -p "$STAGE$G" &&
125 ln_or_cp git-$V.tar.gz "$STAGE$G/." &&
126 ln_or_cp git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz "$STAGE$G/." &&
127 mkdir -p "$STAGE$G/docs/v$V" &&
128 tar Cxf "$STAGE$G/docs/v$V" "$STAGE$G/git-htmldocs-$V.tar.gz" || exit
131 *.rc[0-9]* | *-rc[0-9]*)
132 mkdir -p "$STAGE$G/testing" || exit
135 for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
137 test -f "$rr" || continue
138 ln_or_cp "$rr" "$STAGE$G/testing/." || exit
141 ln_or_cp $HOME/rpms/SRPMS/git-$V-*.src.rpm "$STAGE$G/testing/." || exit
144 mkdir -p "$STAGE$G/RPMS/$arch" "$STAGE$G/RPMS/SRPMS" || exit
147 mkdir -p "$STAGE$G/RPMS/$a" || exit
148 for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
150 test -f "$rr" || continue
151 ln_or_cp "$rr" "$STAGE$G/RPMS/$a/." || exit
154 ln_or_cp $HOME/rpms/SRPMS/git-$V-*.src.rpm "$STAGE$G/RPMS/SRPMS/." || exit
165 find . ! -type d -print0 | cpio -0plumda "$G" ||
166 find . ! -type d -print0 | cpio -0pumda "$G"
169 if test -f /usr/local/bin/yummy
173 /usr/local/bin/yummy "$G/RPMS/$a"
175 /usr/local/bin/yummy "$G/RPMS/SRPMS"