diff options
| author | Joey Hess <joey@kitenet.net> | 2014-03-30 22:14:14 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-03-30 22:14:14 -0400 |
| commit | 4357d6117453e1a0759a6482f4006fa042110a6c (patch) | |
| tree | d1c011a5244f20cec99e3cad384de9ba4d177add /Property/Cmd.hs | |
| parent | 25a12dd8f0e05165c5b7bed2b0e7b62d75b59e5c (diff) | |
propellor spin
Diffstat (limited to 'Property/Cmd.hs')
| -rw-r--r-- | Property/Cmd.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Property/Cmd.hs b/Property/Cmd.hs index b29a12b3..0a4a5ba4 100644 --- a/Property/Cmd.hs +++ b/Property/Cmd.hs @@ -1,10 +1,12 @@ module Property.Cmd ( cmdProperty, cmdProperty', + scriptProperty, module Utility.SafeCommand ) where import Control.Applicative +import Data.List import Types import Utility.Monad @@ -26,3 +28,8 @@ cmdProperty' cmd params env = Property desc $ do showp (Params s) = s showp (Param s) = s showp (File s) = s + +scriptProperty :: [String] -> Property +scriptProperty script = cmdProperty "sh" [Param "-c", Param shellcmd] + where + shellcmd = intercalate " && " script |
