1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-11-23 03:29:48 +01:00

krops: add writeCommand

This commit is contained in:
lassulus 2019-10-23 16:01:38 +02:00
parent 3d59510ac2
commit 2dc1725309

View file

@ -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: {
backup ? false,
fast ? false,