diff options
Diffstat (limited to 'Assistant/Install/AutoStart.hs')
-rw-r--r-- | Assistant/Install/AutoStart.hs | 23 |
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" |