mirror of
https://cgit.krebsco.de/krops/
synced 2025-01-11 02:36:50 +00:00
krops: add writeCommand
This commit is contained in:
parent
3d59510ac2
commit
2dc1725309
@ -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 New Issue
Block a user