diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-06 13:24:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-06 13:24:47 -0400 |
commit | 682ae30a088a45c4f1210d512d8035a64834f895 (patch) | |
tree | 09e49529a5ee5b36a60e20d6d7ba8281a7bd2ed9 /Build/InstallDesktopFile.hs | |
parent | 46ef078b93f77d3e9057fef2fca0ea7fd04ed26c (diff) |
install a .command file on OSX in the Desktop
Diffstat (limited to 'Build/InstallDesktopFile.hs')
-rw-r--r-- | Build/InstallDesktopFile.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Build/InstallDesktopFile.hs b/Build/InstallDesktopFile.hs index d248dc20f..92adacff9 100644 --- a/Build/InstallDesktopFile.hs +++ b/Build/InstallDesktopFile.hs @@ -21,6 +21,7 @@ import Control.Monad import System.Directory import System.Environment import System.Posix.User +import System.Posix.Files import System.FilePath {- The command can be either just "git-annex", or the full path to use @@ -92,6 +93,16 @@ writeOSXDesktop command = do , "</dict>" , "</plist>" ] + + ifM isRoot + ( return () + , do + let commandfile <- home </> "Desktop" </> "git-annex-webapp.command" + writeFile commandfile $ unwords [command, "webapp"] + mode <- fileMode <$> getFileStatus f + setFileMode commandfile $ mode `unionFileModes` ownerExecuteMode + ) + where label = "com.branchable.git-annex.assistant" |