2013-02-13 18:30:04 +00:00
|
|
|
{- /bin/sh handling
|
|
|
|
-
|
|
|
|
- Copyright 2013 Joey Hess <joey@kitenet.net>
|
|
|
|
-
|
2014-05-10 14:01:27 +00:00
|
|
|
- License: BSD-2-clause
|
2013-02-13 18:30:04 +00:00
|
|
|
-}
|
|
|
|
|
|
|
|
{-# 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
|