summaryrefslogtreecommitdiff
path: root/Build/InstallDesktopFile.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-26 17:19:45 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-26 17:23:45 -0400
commitae5533c707148088a14130da7c3ca23bb113d309 (patch)
tree2659507e298e0d071d32054ae626c76388ec2360 /Build/InstallDesktopFile.hs
parent6dfae4212ea292199e0ab215f4f27af182caf74a (diff)
install a git-annex-shell shim script when the standalone OSX app runs
I put it in ~/.ssh/ because there's no reliable way to get it into PATH, and OSX ssh doesn't even honor user's PATH by default. authorized_keys generators will need to check if it's there. Not done yet.
Diffstat (limited to 'Build/InstallDesktopFile.hs')
-rw-r--r--Build/InstallDesktopFile.hs19
1 files changed, 11 insertions, 8 deletions
diff --git a/Build/InstallDesktopFile.hs b/Build/InstallDesktopFile.hs
index 70c0033ee..bf1211bf4 100644
--- a/Build/InstallDesktopFile.hs
+++ b/Build/InstallDesktopFile.hs
@@ -16,7 +16,7 @@ import Utility.Path
import Utility.Monad
import Locations.UserConfig
import Utility.OSX
-import Assistant.OSX
+import Assistant.Install.AutoStart
import Control.Applicative
import System.Directory
@@ -97,16 +97,19 @@ installOSXAppFile appdir appfile mcontent = do
setFileMode dest mode
install :: FilePath -> IO ()
-install = do
+install command = do
#ifdef darwin_HOST_OS
- writeOSXDesktop
+ writeOSXDesktop command
#else
- writeFDODesktop
+ writeFDODesktop command
#endif
- unlessM isRoot $ do
- programfile <- inDestDir =<< programFile
- createDirectoryIfMissing True (parentDir programfile)
- writeFile programfile command
+ ifM isRoot
+ ( return ()
+ , do
+ programfile <- inDestDir =<< programFile
+ createDirectoryIfMissing True (parentDir programfile)
+ writeFile programfile command
+ )
main :: IO ()
main = getArgs >>= go