From 4357d6117453e1a0759a6482f4006fa042110a6c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 22:14:14 -0400 Subject: propellor spin --- Property/Cmd.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Property/Cmd.hs') 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 -- cgit v1.3-2-g0d8e