summaryrefslogtreecommitdiff
path: root/standalone
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-03 14:08:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-03 14:08:26 -0400
commitfbcdb2efc7e6782422b8e87f029f850aa350a901 (patch)
tree62b31fbf621121c60f169bbbcc2292ccde235e4a /standalone
parent1e54cdf735258c7970f4283f0276322dd32a3724 (diff)
work around git/environment/gecos/android suck
I don't know why, but I can't seem to set the environment variables inside git-annex to work around the git error caused by android's crappy username and hostname settings. This workaround works, and that's all that's good about it.
Diffstat (limited to 'standalone')
-rwxr-xr-xstandalone/android/runshell21
1 files changed, 10 insertions, 11 deletions
diff --git a/standalone/android/runshell b/standalone/android/runshell
index 68a4d6588..0bd193b74 100755
--- a/standalone/android/runshell
+++ b/standalone/android/runshell
@@ -58,10 +58,10 @@ buildtree () {
}
install () {
+ if ! $cmd mkdir -p "$HOME"; then
+ $cmd echo "mkdir of $HOME failed!"
+ fi
if $cmd test ! -e "$base/bin/git-annex"; then
- if ! $cmd mkdir -p "$HOME"; then
- $cmd echo "mkdir of $HOME failed!"
- fi
if ! buildtree > $HOME/git-annex-install.log 2>&1; then
$cmd echo "Installation failed! Please report a bug and attach $HOME/git-annex-install.log"
$cmd sh
@@ -86,7 +86,7 @@ run () {
export ORIG_GIT_TEMPLATE_DIR
GIT_TEMPLATE_DIR="$base/templates"
export GIT_TEMPLATE_DIR
-
+
# Indicate which variables were exported above.
GIT_ANNEX_STANDLONE_ENV="GIT_EXEC_PATH GIT_TEMPLATE_DIR"
export GIT_ANNEX_STANDLONE_ENV
@@ -98,18 +98,17 @@ run () {
# /tmp probably doesn't exist, so also use it as TMPDIR
TMPDIR=$GIT_ANNEX_TMP_DIR
export TMPDIR
-
+
+ if $cmd test ! -e "$HOME/.gitconfig"; then
+ git config --global user.email "git-annex@android"
+ git config --global user.name "android"
+ fi
+
if $cmd test "$1"; then
cmd="$1"
shift 1
exec "$cmd" "$@"
else
- # Ensure home directory exists, even if it got deleted
- # somehow.
- if ! $cmd mkdir -p "$HOME"; then
- $cmd echo "mkdir of $HOME failed!"
- fi
-
# As good a start point as any.
cd "$HOME"