install a .command file on OSX in the Desktop
This commit is contained in:
parent
46ef078b93
commit
682ae30a08
1 changed files with 11 additions and 0 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue