diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-03-11 22:31:45 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-03-11 22:31:45 -0400 |
| commit | b508bb52fd3c7e9862c0475d052deb5474be2e0c (patch) | |
| tree | 7a422a77dfb90097c0aefdc7bde1bd011c0c63d2 /src | |
| parent | 971d688a729c66a71a73c605201f81863a8f027f (diff) | |
propellor spin
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Cmd.hs | 2 | ||||
| -rw-r--r-- | src/Propellor/Property/SiteSpecific/JoeySites.hs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Propellor/Property/Cmd.hs b/src/Propellor/Property/Cmd.hs index 7fd189df..ae8238f5 100644 --- a/src/Propellor/Property/Cmd.hs +++ b/src/Propellor/Property/Cmd.hs @@ -40,6 +40,6 @@ scriptProperty script = cmdProperty "sh" ["-c", shellcmd] -- | A property that can satisfied by running a series of shell commands, -- as user (cd'd to their home directory). userScriptProperty :: UserName -> [String] -> Property NoInfo -userScriptProperty user script = cmdProperty "su" ["-c", shellcmd, user] +userScriptProperty user script = cmdProperty "su" ["--shell", "/bin/sh", "-c", shellcmd, user] where shellcmd = intercalate " ; " ("set -e" : "cd" : script) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index c84b0dca..1abad06f 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -26,13 +26,14 @@ scrollBox :: Property HasInfo scrollBox = propertyList "scroll shell box" $ props & alias "scroll.joeyh.name" & User.accountFor "scroll" - & Git.cloned "root" "git://git.kitenet.net/scroll" (d </> "scroll") Nothing + & Git.cloned "scroll" "git://git.kitenet.net/scroll" (d </> "scroll") Nothing & Apt.installed ["ghc", "make", "cabal-install", "libghc-vector-dev", "libghc-bytestring-dev", "libghc-mtl-dev", "libghc-ncurses-dev", "libghc-random-dev", "libghc-monad-loops-dev", "libghc-ifelse-dev", "libghc-case-insensitive-dev"] - & scriptProperty + & userScriptProperty "scroll" [ "cd " ++ d </> "scroll" + , "git pull" , "cabal configure" , "make" ] @@ -40,7 +41,7 @@ scrollBox = propertyList "scroll shell box" $ props [ "#!/bin/sh" , "set -e" , "echo Preparing to run scroll!" - , "cd " ++ d </> "scroll" + , "cd " ++ d , "mkdir -p tmp" , "TMPDIR= t=$(tempfile -d tmp)" , "rm -f \"$t\"" |
