Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Download from new git sources folder
Browse files Browse the repository at this point in the history
Fetch man-pages from git-manpages repository
  • Loading branch information
timcharper committed Apr 23, 2014
1 parent ed835fa commit ae47d7a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "git-manpages"]
path = git-manpages
url = http://git.kernel.org/pub/scm/git/git-manpages.git
18 changes: 12 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ $SUDO mv $PREFIX{,_`date +%s`} || echo "Git not installed currently"

mkdir -p git_build

DOWNLOAD_LOCATION="http://git-core.googlecode.com/files"

export CFLAGS="-mmacosx-version-min=10.6 -isysroot $SDK_PATH -arch i386 -arch x86_64"
export LDFLAGS="-mmacosx-version-min=10.6 -isysroot $SDK_PATH -arch i386 -arch x86_64"

Expand All @@ -25,7 +23,7 @@ export CPLUS_INCLUDE_PATH=/usr/include
export LD_LIBRARY_PATH=/usr/lib

pushd git_build
[ ! -f git-$GIT_VERSION.tar.gz ] && curl -O $DOWNLOAD_LOCATION/git-$GIT_VERSION.tar.gz
[ ! -f git-$GIT_VERSION.tar.gz ] && curl https://codeload.github.com/git/git/tar.gz/v${GIT_VERSION} > git-$GIT_VERSION.tar.gz
[ ! -d git-$GIT_VERSION ] && tar zxvf git-$GIT_VERSION.tar.gz
pushd git-$GIT_VERSION

Expand All @@ -48,10 +46,18 @@ pushd git_build
popd
popd

git_man_archive=git-manpages-$GIT_VERSION.tar.gz
[ ! -f $git_man_archive ] && curl -O $DOWNLOAD_LOCATION/$git_man_archive
GIT_MANPAGES_FOLDER="../git-manpages/.git"
echo "-----------------------"
echo
echo "Please ensure that the folder `pwd`/$GIT_MANPAGES_FOLDER is at version $GIT_VERSION"
printf "Press enter:"
read
echo
$SUDO mkdir -p $PREFIX/share/man
if ( ! $SUDO tar xzvo -C $PREFIX/share/man -f $git_man_archive ); then
GIT_MANPAGES_ARCHIVE=git-manpages-$GIT_VERSION.tar.gz
git archive --format=tar --remote $GIT_MANPAGES_FOLDER HEAD | gzip > $GIT_MANPAGES_ARCHIVE
echo "sudo tar xf <(git archive --format=tar --remote $GIT_MANPAGES_FOLDER HEAD) -C $PREFIX/share/man"
if ( ! sudo tar xzf $GIT_MANPAGES_ARCHIVE -C $PREFIX/share/man ); then
echo "Error extracting manpages!!! Maybe download location has changed / failed? Look at `pwd`/$git_man_archive. Remove it and re-run build to attempt redownload."
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion build_package_test_and_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e -o pipefail
rm -f Disk\ Image/*.pkg

if [ "`uname`" == "Darwin" ]; then sed_regexp="-E"; else sed_regexp="-r"; fi
GIT_VERSION="${1:-`curl http://git-scm.com/ 2>&1 | grep "<span class='version'>" | sed $sed_regexp 's/^.+>([0-9.]+)<.+$/\1/'`}"
GIT_VERSION="${1:-`curl http://git-scm.com/ 2>&1 | grep '<span class="version">' -A 1 | tail -n 1 | sed $sed_regexp 's/ *//'`}"

./build.sh $GIT_VERSION

Expand Down
1 change: 1 addition & 0 deletions git-manpages
Submodule git-manpages added at 8e0f4d

0 comments on commit ae47d7a

Please sign in to comment.