Created
March 23, 2012 20:17
-
-
Save 3noch/2174548 to your computer and use it in GitHub Desktop.
Shell Scripting in Haskell (from http://www.yesodweb.com/blog/2012/03/shelly-for-shell-scripts)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Shelly | |
import Prelude hiding (FilePath) | |
sudo_ com args = run_ "sudo" (com:args) | |
main = shelly $ verbosely $ do | |
apt_get "update" [] | |
apt_get "install" ["haskell-platform"] | |
where | |
apt_get mode more = sudo_ "apt-get" (["-y", "-q", mode] ++ more) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uncanny: Bash's extension is "sh" and Haskell's is "hs"