propellor spin
This commit is contained in:
parent
971d688a72
commit
b508bb52fd
|
@ -1,3 +1,10 @@
|
||||||
|
propellor (2.2.1) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* userScriptProperty now passes --shell /bin/sh, so it can be used
|
||||||
|
even for users with nonstandard shells.
|
||||||
|
|
||||||
|
-- Joey Hess <id@joeyh.name> Wed, 11 Mar 2015 22:29:23 -0400
|
||||||
|
|
||||||
propellor (2.2.0) unstable; urgency=medium
|
propellor (2.2.0) unstable; urgency=medium
|
||||||
|
|
||||||
* When running shimmed (eg in a docker container),
|
* When running shimmed (eg in a docker container),
|
||||||
|
|
|
@ -40,6 +40,6 @@ scriptProperty script = cmdProperty "sh" ["-c", shellcmd]
|
||||||
-- | A property that can satisfied by running a series of shell commands,
|
-- | A property that can satisfied by running a series of shell commands,
|
||||||
-- as user (cd'd to their home directory).
|
-- as user (cd'd to their home directory).
|
||||||
userScriptProperty :: UserName -> [String] -> Property NoInfo
|
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
|
where
|
||||||
shellcmd = intercalate " ; " ("set -e" : "cd" : script)
|
shellcmd = intercalate " ; " ("set -e" : "cd" : script)
|
||||||
|
|
|
@ -26,13 +26,14 @@ scrollBox :: Property HasInfo
|
||||||
scrollBox = propertyList "scroll shell box" $ props
|
scrollBox = propertyList "scroll shell box" $ props
|
||||||
& alias "scroll.joeyh.name"
|
& alias "scroll.joeyh.name"
|
||||||
& User.accountFor "scroll"
|
& 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",
|
& Apt.installed ["ghc", "make", "cabal-install", "libghc-vector-dev",
|
||||||
"libghc-bytestring-dev", "libghc-mtl-dev", "libghc-ncurses-dev",
|
"libghc-bytestring-dev", "libghc-mtl-dev", "libghc-ncurses-dev",
|
||||||
"libghc-random-dev", "libghc-monad-loops-dev",
|
"libghc-random-dev", "libghc-monad-loops-dev",
|
||||||
"libghc-ifelse-dev", "libghc-case-insensitive-dev"]
|
"libghc-ifelse-dev", "libghc-case-insensitive-dev"]
|
||||||
& scriptProperty
|
& userScriptProperty "scroll"
|
||||||
[ "cd " ++ d </> "scroll"
|
[ "cd " ++ d </> "scroll"
|
||||||
|
, "git pull"
|
||||||
, "cabal configure"
|
, "cabal configure"
|
||||||
, "make"
|
, "make"
|
||||||
]
|
]
|
||||||
|
@ -40,7 +41,7 @@ scrollBox = propertyList "scroll shell box" $ props
|
||||||
[ "#!/bin/sh"
|
[ "#!/bin/sh"
|
||||||
, "set -e"
|
, "set -e"
|
||||||
, "echo Preparing to run scroll!"
|
, "echo Preparing to run scroll!"
|
||||||
, "cd " ++ d </> "scroll"
|
, "cd " ++ d
|
||||||
, "mkdir -p tmp"
|
, "mkdir -p tmp"
|
||||||
, "TMPDIR= t=$(tempfile -d tmp)"
|
, "TMPDIR= t=$(tempfile -d tmp)"
|
||||||
, "rm -f \"$t\""
|
, "rm -f \"$t\""
|
||||||
|
|
Loading…
Reference in New Issue