diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-28 16:09:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-28 16:09:38 -0400 |
commit | fb71a853d0013cfb20dbe4a59eba68a022005724 (patch) | |
tree | 7153a24355009e850d3885dcb9de68661c7c48f6 | |
parent | 90eabc3e24223c426562834eab2128a8d4cf5d7c (diff) |
Fix broken .config/git-annex/program installed by standalone tarball.
It was doubly broken; both missing a slash, and containing
"runshell git-annex", while some parts of the code expected it to be a
simple path to a program. This appears to include the transfer queue
runner, and the code that starts a new assistant process when switching to
another repository in the webapp.
-rw-r--r-- | Assistant/Install.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bugs/wrong_program_path_in___126____47__.config__47__git-annex__47__program.mdwn | 2 | ||||
-rwxr-xr-x | standalone/linux/git-annex | 25 | ||||
-rwxr-xr-x | standalone/osx/git-annex.app/Contents/MacOS/git-annex | 25 |
5 files changed, 54 insertions, 1 deletions
diff --git a/Assistant/Install.hs b/Assistant/Install.hs index 97f2dee94..6fa30f250 100644 --- a/Assistant/Install.hs +++ b/Assistant/Install.hs @@ -39,7 +39,7 @@ ensureInstalled = go =<< standaloneAppBase where go Nothing = noop go (Just base) = do - let program = base ++ "runshell git-annex" + let program = base <$> "git-annex" programfile <- programFile createDirectoryIfMissing True (parentDir programfile) writeFile programfile program diff --git a/debian/changelog b/debian/changelog index 37c322acd..e2bdd6046 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ git-annex (3.20121128) UNRELEASED; urgency=low * webapp: Defaults to sharing box.com account info with friends, allowing one-click enabling of the repository. + * Fix broken .config/git-annex/program installed by standalone tarball. -- Joey Hess <joeyh@debian.org> Wed, 28 Nov 2012 13:31:07 -0400 diff --git a/doc/bugs/wrong_program_path_in___126____47__.config__47__git-annex__47__program.mdwn b/doc/bugs/wrong_program_path_in___126____47__.config__47__git-annex__47__program.mdwn index 7d0de0d87..ae8496a68 100644 --- a/doc/bugs/wrong_program_path_in___126____47__.config__47__git-annex__47__program.mdwn +++ b/doc/bugs/wrong_program_path_in___126____47__.config__47__git-annex__47__program.mdwn @@ -16,3 +16,5 @@ git-annex=3.20121127 on Ubuntu 12.04 LTS ## Please provide any additional information below. Otherwise it is working great. + +> I've fixed this. [[done]] --[[Joey]] diff --git a/standalone/linux/git-annex b/standalone/linux/git-annex new file mode 100755 index 000000000..cda5b569b --- /dev/null +++ b/standalone/linux/git-annex @@ -0,0 +1,25 @@ +#!/bin/sh +base="$(dirname $0)" +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/bin/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +"$base/runshell" git-annex "$@" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-annex b/standalone/osx/git-annex.app/Contents/MacOS/git-annex new file mode 100755 index 000000000..cda5b569b --- /dev/null +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-annex @@ -0,0 +1,25 @@ +#!/bin/sh +base="$(dirname $0)" +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/bin/git-annex" ]; then + GIT_ANNEX_APP_BASE="$base" + export GIT_ANNEX_APP_BASE +fi + +"$base/runshell" git-annex "$@" |