mirror of
https://cgit.krebsco.de/krops
synced 2024-11-26 21:19:47 +01:00
krops: add writeCommand
This commit is contained in:
parent
3d59510ac2
commit
2dc1725309
1 changed files with 15 additions and 0 deletions
|
@ -30,6 +30,21 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
writeCommand = name: {
|
||||||
|
command ? (targetPath: "echo ${targetPath}"),
|
||||||
|
backup ? false,
|
||||||
|
force ? false,
|
||||||
|
source,
|
||||||
|
target
|
||||||
|
}: let
|
||||||
|
target' = lib.mkTarget target;
|
||||||
|
in
|
||||||
|
writeDash name ''
|
||||||
|
set -efu
|
||||||
|
${populate { inherit backup force source; target = target'; }}
|
||||||
|
${remoteCommand target' (command target'.path)}
|
||||||
|
'';
|
||||||
|
|
||||||
writeDeploy = name: {
|
writeDeploy = name: {
|
||||||
backup ? false,
|
backup ? false,
|
||||||
fast ? false,
|
fast ? false,
|
||||||
|
|
Loading…
Reference in a new issue