mirror of
https://github.com/git/git.git
synced 2026-08-09 17:40:16 +00:00
Meta/DoKernelOrg: modernize a bit
There is no point insisting on being a particular branch like master and maint, and also requiring the name of the branch given from the command line.
This commit is contained in:
202
DoKernelOrg
202
DoKernelOrg
@@ -1,132 +1,90 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "`uname -m 2>/dev/null`" in
|
||||
x86_64)
|
||||
USE_PIC=YesPlease
|
||||
export USE_PIC
|
||||
;;
|
||||
esac
|
||||
|
||||
: ${J='-l 4 -j'}
|
||||
G=/pub/software/scm/git &&
|
||||
|
||||
# (cd $HOME/git 2>/dev/null || cd $HOME/git.git || exit ) &&
|
||||
make clean >/dev/null 2>&1 &&
|
||||
git reset --hard &&
|
||||
make clean >/dev/null 2>&1 &&
|
||||
git checkout master &&
|
||||
make clean >/dev/null 2>&1 &&
|
||||
HERE=$(git symbolic-ref HEAD) || exit 1
|
||||
THIS=$(git describe HEAD)
|
||||
|
||||
case "$(asciidoc --version 2>&1)" in
|
||||
asciidoc' 8'.*)
|
||||
ASCIIDOC8=YesPlease
|
||||
export ASCIIDOC8 ;;
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
'')
|
||||
echo "* Building all"
|
||||
: ${branches='next master maint pu'}
|
||||
nstalled=install
|
||||
for branch in $branches
|
||||
do
|
||||
if git rev-parse --verify refs/heads/$branch 2>/dev/null
|
||||
then
|
||||
echo "** $branch **" &&
|
||||
git checkout $branch &&
|
||||
make $J $nstalled &&
|
||||
make test &&
|
||||
make clean &&
|
||||
nstalled=all || exit $?
|
||||
else
|
||||
echo
|
||||
echo "* NO $branch"
|
||||
echo
|
||||
fi
|
||||
done >:all.log 2>&1
|
||||
rm -f version
|
||||
case `hostname` in
|
||||
hera.kernel.org)
|
||||
narch='x86_64 i386'
|
||||
arch=x86_64 ;;
|
||||
wing-fc*|fc*.siamese.dyndns.org)
|
||||
eval $(rpm --showrc | sed -ne '
|
||||
s/^-14: dist[ ]*\./dist=/p
|
||||
s/^-14: _build_arch[ ]*/arch=/p
|
||||
') &&
|
||||
test -n "$dist" && test -n "$arch" || exit 1
|
||||
;;
|
||||
|
||||
maint | maint-* | master)
|
||||
rm -f version
|
||||
case `hostname` in
|
||||
hera.kernel.org)
|
||||
narch='x86_64 i386'
|
||||
arch=x86_64 ;;
|
||||
wing-fc*|fc*.siamese.dyndns.org)
|
||||
arch=i386 ;;
|
||||
*) echo >&2 "What are you talking about???"
|
||||
exit 1 ;;
|
||||
esac &&
|
||||
: >./:all.log &&
|
||||
echo "* Building $1" &&
|
||||
git checkout "$1" &&
|
||||
make $J git >./:all.log 2>&1 &&
|
||||
V=`./git --version | sed -e 's/git version //'` &&
|
||||
make rpm >>./:all.log 2>&1 &&
|
||||
case "$narch" in
|
||||
'')
|
||||
# This is not the primary build machine.
|
||||
status=$?
|
||||
case "$status" in
|
||||
0)
|
||||
echo >&2 "Done -- move RPMS to the master machine."
|
||||
(
|
||||
cd "$HOME/rpms/" &&
|
||||
tar cf "TARBALL/$V.$arch.tar" \
|
||||
RPMS/$arch/*-$V-*.$arch.rpm &&
|
||||
ls -ld $HOME/rpms/TARBALL/$V.$arch.tar
|
||||
)
|
||||
make clean
|
||||
;;
|
||||
?)
|
||||
echo >&2 "Failed with status $status"
|
||||
;;
|
||||
esac
|
||||
exit $status ;;
|
||||
*)
|
||||
make dist-doc >>./:all.log 2>&1 &&
|
||||
ln -f git-$V.tar.gz $G/. &&
|
||||
ln -f git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz $G/.
|
||||
*) echo >&2 "What are you talking about???"
|
||||
exit 1 ;;
|
||||
esac &&
|
||||
: >./:all.log &&
|
||||
echo "* Building $THIS" &&
|
||||
make $J git >./:all.log 2>&1 &&
|
||||
V=`./git --version | sed -e 's/git version //'` &&
|
||||
make rpm >>./:all.log 2>&1 &&
|
||||
case "$narch" in
|
||||
'')
|
||||
# This is not the primary build machine.
|
||||
status=$?
|
||||
case "$status" in
|
||||
0)
|
||||
echo >&2 "Done -- move RPMS to the master machine."
|
||||
(
|
||||
cd "$HOME/rpms/" &&
|
||||
tar cf "TARBALL/$V.$arch.$dist.tar" \
|
||||
RPMS/$arch/*-$V-*.$dist.$arch.rpm &&
|
||||
ls -ld $HOME/rpms/TARBALL/$V.$arch.$dist.tar
|
||||
) &&
|
||||
make clean
|
||||
;;
|
||||
esac >>./:all.log 2>&1 &&
|
||||
case "$V" in
|
||||
*.rc[0-9]* | *-rc[0-9]*)
|
||||
mkdir -p $G/testing &&
|
||||
?)
|
||||
echo >&2 "Failed with status $status"
|
||||
;;
|
||||
esac
|
||||
exit $status ;;
|
||||
*)
|
||||
make dist-doc >>./:all.log 2>&1 &&
|
||||
ln -f git-$V.tar.gz $G/. &&
|
||||
ln -f git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz $G/.
|
||||
;;
|
||||
esac >>./:all.log 2>&1 &&
|
||||
case "$V" in
|
||||
*.rc[0-9]* | *-rc[0-9]*)
|
||||
mkdir -p $G/testing &&
|
||||
for a in $narch
|
||||
do
|
||||
for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
|
||||
do
|
||||
test -f "$rr" || continue
|
||||
ln -f "$rr" $G/testing/.
|
||||
done
|
||||
done &&
|
||||
ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/testing/.
|
||||
;;
|
||||
*)
|
||||
mkdir -p $G/RPMS/$arch $G/RPMS/SRPMS &&
|
||||
for a in $narch
|
||||
do
|
||||
mkdir -p "$G/RPMS/$a" &&
|
||||
for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
|
||||
do
|
||||
test -f "$rr" || continue
|
||||
ln -f "$rr" $G/RPMS/$a/.
|
||||
done
|
||||
done &&
|
||||
ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/RPMS/SRPMS/. &&
|
||||
{
|
||||
# I do not know how it exits, and I do not care much.
|
||||
for a in $narch
|
||||
do
|
||||
for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
|
||||
do
|
||||
test -f "$rr" || continue
|
||||
ln -f "$rr" $G/testing/.
|
||||
done
|
||||
done &&
|
||||
ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/testing/.
|
||||
;;
|
||||
*)
|
||||
mkdir -p $G/RPMS/$arch $G/RPMS/SRPMS &&
|
||||
for a in $narch
|
||||
do
|
||||
mkdir -p "$G/RPMS/$a" &&
|
||||
for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm
|
||||
do
|
||||
test -f "$rr" || continue
|
||||
ln -f "$rr" $G/RPMS/$a/.
|
||||
done
|
||||
done &&
|
||||
ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/RPMS/SRPMS/. &&
|
||||
{
|
||||
# I do not know how it exits, and I do not care much.
|
||||
for a in $narch
|
||||
do
|
||||
/usr/local/bin/yummy $G/RPMS/$a
|
||||
done
|
||||
/usr/local/bin/yummy $G/RPMS/SRPMS
|
||||
:
|
||||
} >>./:all.log 2>&1 ;;
|
||||
esac &&
|
||||
make clean &&
|
||||
|
||||
: ;;
|
||||
esac || exit $?
|
||||
|
||||
git checkout master
|
||||
/usr/local/bin/yummy $G/RPMS/$a
|
||||
done
|
||||
/usr/local/bin/yummy $G/RPMS/SRPMS
|
||||
:
|
||||
} >>./:all.log 2>&1 ;;
|
||||
esac &&
|
||||
make clean
|
||||
|
||||
Reference in New Issue
Block a user