Add copy-to-args section to keter.yaml which allows all kinds of options.
This commit is contained in:
parent
97b6857912
commit
31ae5fdee7
@ -81,9 +81,20 @@ keter cabal noBuild noCopyTo = do
|
|||||||
|
|
||||||
unless noCopyTo $ case Map.lookup "copy-to" value of
|
unless noCopyTo $ case Map.lookup "copy-to" value of
|
||||||
Just (String s) ->
|
Just (String s) ->
|
||||||
case parseMaybe (.: "copy-to-port") value of
|
let baseArgs = [fp, T.unpack s] :: [String]
|
||||||
Just i -> run "scp" ["-P" ++ show (i :: Int), fp, T.unpack s]
|
|
||||||
Nothing -> run "scp" [fp, T.unpack s]
|
scpArgs =
|
||||||
|
case parseMaybe (.: "copy-to-args") value of
|
||||||
|
Just as -> as ++ baseArgs
|
||||||
|
Nothing -> baseArgs
|
||||||
|
|
||||||
|
args =
|
||||||
|
case parseMaybe (.: "copy-to-port") value of
|
||||||
|
Just i -> "-P" : show (i :: Int) : scpArgs
|
||||||
|
Nothing -> scpArgs
|
||||||
|
|
||||||
|
in run "scp" args
|
||||||
|
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
where
|
where
|
||||||
-- Test for alternative config file extension (yaml or yml).
|
-- Test for alternative config file extension (yaml or yml).
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user