# 2010 10 30 Mouse V=1.6.4.1 : ${LOCALROOT:=/local} r=`uname -s`-`uname -r` if [ ! -d patches-$r ]; then echo No patches for $r\! 1>&2 exit 1 fi # Use mtar if available, but don't depend on it. if sh -c 'mtar + config' > /dev/null 2>&1; then TAR="mtar xfFF -" else TAR="tar xf -" fi bunzip2 < DIST/git-$V.tar.bz2 | $TAR cd git-$V bunzip2 < ../DIST/git-manpages-$V.tar.bz2 | $TAR # Patchsets are broken up each into its own loop for ease of regeneration # We'd normally use -V none on the patch commands. But this script is # occasionally run on a totally stock system, so instead we just # destroy the resulting .orig files. # Patchset 1: most fixes. (cd ..; find patches -type f -print) | sed -e "s@/@ @" | while read d f; do patch $f < ../$d/$f rm -f $f.orig done # Patchset 2: patches which depend on $LOCALROOT. (cd ..; find patches.localized -type f -print) | sed -e "s@/@ @" | while read d f; do sed -e 's@@LOCALROOT@@'"$LOCALROOT"'' < ../$d/$f | patch $f rm -f $f.orig done # Patchset 3: per-OS patches. (cd ..; find patches-$r -type f -print) | sed -e "s@/@ @" | while read d f; do patch $f < ../$d/$f rm -f $f.orig done # Patchset 4 does not exist; this comment makes regeneration easier. gnumake gnumake install mkdir -p $LOCALROOT/.man/git-$V for d in man?; do mkdir -p $LOCALROOT/.man/git-$V/$d cp $d/* $LOCALROOT/.man/git-$V/$d done cd .. rm -rf git-$V