From 682ae30a088a45c4f1210d512d8035a64834f895 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Sep 2012 13:24:47 -0400 Subject: install a .command file on OSX in the Desktop --- Build/InstallDesktopFile.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Build/InstallDesktopFile.hs') 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 , "" , "" ] + + 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" -- cgit v1.2.3