From d0655bbe7c30e0b417f9d82457fde0a47f9f86a0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 24 Dec 2013 16:28:10 -0400 Subject: Include git-receive-pack, git-upload-pack, and git wrappers in the Linux standalone build, and OSX app, so they will be available when it's added to PATH. --- standalone/osx/git-annex.app/Contents/MacOS/git | 31 ++++++++++++++++++++++ .../git-annex.app/Contents/MacOS/git-receive-pack | 31 ++++++++++++++++++++++ .../git-annex.app/Contents/MacOS/git-upload-pack | 31 ++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100755 standalone/osx/git-annex.app/Contents/MacOS/git create mode 100755 standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack create mode 100755 standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack (limited to 'standalone/osx') diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git b/standalone/osx/git-annex.app/Contents/MacOS/git new file mode 100755 index 000000000..ccf2cd741 --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git "$@" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack b/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack new file mode 100755 index 000000000..efbbf2bb3 --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git-receive-pack "$@" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack b/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack new file mode 100755 index 000000000..5049371c9 --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack @@ -0,0 +1,31 @@ +#!/bin/sh +link="$(readlink "$0")" || true +if [ -n "$link" ]; then + base="$(dirname "$link")" +else + base="$(dirname "$0")" +fi + +if [ ! -d "$base" ]; then + echo "** cannot find base directory (I seem to be $0)" >&2 + exit 1 +fi +if [ ! -e "$base/runshell" ]; then + echo "** cannot find $base/runshell" >&2 + exit 1 +fi + +# Get absolute path to base, to avoid breakage when things change directories. +orig="$(pwd)" +cd "$base" +base="$(pwd)" +cd "$orig" + +# If this is a standalone app, set a variable that git-annex can use to +# install itself. +if [ -e "$base/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +exec "$base/runshell" git-upload-pack "$@" -- cgit v1.2.3