aboutsummaryrefslogtreecommitdiff
path: root/standalone/osx/git-annex.app/Contents
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-24 16:28:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-24 16:28:10 -0400
commitd0655bbe7c30e0b417f9d82457fde0a47f9f86a0 (patch)
tree0b5f604dae54d291651a6c77a31a405e04c46901 /standalone/osx/git-annex.app/Contents
parent0f4ca88ceda2f8a49a3a1bfc60f864c517944832 (diff)
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.
Diffstat (limited to 'standalone/osx/git-annex.app/Contents')
-rwxr-xr-xstandalone/osx/git-annex.app/Contents/MacOS/git31
-rwxr-xr-xstandalone/osx/git-annex.app/Contents/MacOS/git-receive-pack31
-rwxr-xr-xstandalone/osx/git-annex.app/Contents/MacOS/git-upload-pack31
3 files changed, 93 insertions, 0 deletions
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 "$@"