diff options
author | Joey Hess <joey@kitenet.net> | 2013-02-13 14:30:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-02-13 14:30:04 -0400 |
commit | 86a2e79338c13108e100859a942883690ad286f3 (patch) | |
tree | 375323fc282638ae62b8b8a0b8834b6dbdf92d18 /Utility/Shell.hs | |
parent | 9aadec552b0590fbed10ed9e1d74540bbaf5fb7f (diff) |
deal with Android's nonstandard shell location
This is so gratutious and pointless. It's a shame that everything we
learned about Unix portability and the importance of standards has been
thrown out the window by these guys.
Diffstat (limited to 'Utility/Shell.hs')
-rw-r--r-- | Utility/Shell.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Utility/Shell.hs b/Utility/Shell.hs new file mode 100644 index 000000000..fecafe1a8 --- /dev/null +++ b/Utility/Shell.hs @@ -0,0 +1,20 @@ +{- /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 + +shellPath :: FilePath +#ifndef WITH_ANDROID +shellPath = "/bin/sh" +#else +shellPath = "/system/bin/sh" +#endif + +shebang :: String +shebang = "#!" ++ shellPath |