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.
This commit is contained in:
Joey Hess 2013-02-13 14:30:04 -04:00
parent 8c66801c78
commit f40180f033
5 changed files with 32 additions and 7 deletions

20
Utility/Shell.hs Normal file
View file

@ -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