From ae47d7a470e94e11d7ec6bad64f0fa3ae1ce1abe Mon Sep 17 00:00:00 2001 From: Tim Harper Date: Wed, 23 Apr 2014 09:02:10 -0600 Subject: [PATCH] Download from new git sources folder Fetch man-pages from git-manpages repository --- .gitmodules | 3 +++ build.sh | 18 ++++++++++++------ build_package_test_and_bundle.sh | 2 +- git-manpages | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 .gitmodules create mode 160000 git-manpages diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2ff72df --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "git-manpages"] + path = git-manpages + url = http://git.kernel.org/pub/scm/git/git-manpages.git diff --git a/build.sh b/build.sh index 73d0a58..82147f0 100755 --- a/build.sh +++ b/build.sh @@ -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" @@ -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 @@ -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 diff --git a/build_package_test_and_bundle.sh b/build_package_test_and_bundle.sh index 90af65b..07b3900 100755 --- a/build_package_test_and_bundle.sh +++ b/build_package_test_and_bundle.sh @@ -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 "" | sed $sed_regexp 's/^.+>([0-9.]+)<.+$/\1/'`}" +GIT_VERSION="${1:-`curl http://git-scm.com/ 2>&1 | grep '' -A 1 | tail -n 1 | sed $sed_regexp 's/ *//'`}" ./build.sh $GIT_VERSION diff --git a/git-manpages b/git-manpages new file mode 160000 index 0000000..8e0f4d7 --- /dev/null +++ b/git-manpages @@ -0,0 +1 @@ +Subproject commit 8e0f4d724ce6db7c11f2cb189bb73f0d6bf29c07