blob: 692774939d9c8d1ca7a0774e1e07873fb6d12073 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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"
|