summaryrefslogtreecommitdiff
path: root/Assistant/Install
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 /Assistant/Install
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 'Assistant/Install')
-rw-r--r--Assistant/Install/AutoStart.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Assistant/Install/AutoStart.hs b/Assistant/Install/AutoStart.hs
new file mode 100644
index 000000000..692774939
--- /dev/null
+++ b/Assistant/Install/AutoStart.hs
@@ -0,0 +1,23 @@
+{- Assistant OSX autostart file installation
+ -
+ - Copyright 2012 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Assistant.Install.AutoStart where
+
+import Utility.OSX
+import Utility.Path
+
+import System.Directory
+
+{- Installs an autostart plist file for OSX. -}
+installAutoStart :: FilePath -> FilePath -> IO ()
+installAutoStart command file = do
+ createDirectoryIfMissing True (parentDir file)
+ writeFile file $ genOSXAutoStartFile autoStartLabel command
+ ["assistant", "--autostart"]
+
+autoStartLabel :: String
+autoStartLabel = "com.branchable.git-annex.assistant"