2013-02-13 18:30:04 +00:00
|
|
|
{- /bin/sh handling
|
|
|
|
-
|
|
|
|
- Copyright 2013 Joey Hess <joey@kitenet.net>
|
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
{-# LANGUAGE CPP #-}
|
|
|
|
|
|
|
|
module Utility.Shell where
|
|
|
|
|
2013-05-06 19:58:13 +00:00
|
|
|
shellPath_portable :: FilePath
|
|
|
|
shellPath_portable = "/bin/sh"
|
|
|
|
|
|
|
|
shellPath_local :: FilePath
|
2013-02-27 06:39:22 +00:00
|
|
|
#ifndef __ANDROID__
|
2013-05-06 19:58:13 +00:00
|
|
|
shellPath_local = shellPath_portable
|
2013-02-13 18:30:04 +00:00
|
|
|
#else
|
2013-05-06 19:58:13 +00:00
|
|
|
shellPath_local = "/system/bin/sh"
|
2013-02-13 18:30:04 +00:00
|
|
|
#endif
|
|
|
|
|
2013-05-06 19:58:13 +00:00
|
|
|
shebang_portable :: String
|
|
|
|
shebang_portable = "#!" ++ shellPath_portable
|
|
|
|
|
|
|
|
shebang_local :: String
|
|
|
|
shebang_local = "#!" ++ shellPath_local
|