populate dir: drop link-method fragments

This commit is contained in:
tv 2015-10-20 20:19:40 +02:00
parent 2efaf0f219
commit acb53c23dc

View File

@ -203,11 +203,8 @@ let out = {
current-host = config.krebs.hosts.${current-host-name};
current-user = config.krebs.users.${current-user-name};
target-host = config.krebs.hosts.${system};
methods.dir = config:
let
can-link = config.host.name == target-host.name;
can-push = config.host.name == current-host.name;
push-method = ''
rsync \
@ -219,13 +216,12 @@ let out = {
--delete-excluded \
-vrLptgoD \
${config.path}/ \
root@${target}:${config.target-path}
${target-url}
'';
current-url = "${current-user-name}@${current-host.name}";
source-url = "file://${config.host.name}${config.path}";
target-url = "root@${target}:${config.target-path}";
in
#if can-link then link-method else
if can-push then push-method else
throw
# /!\ revise this message when using more than just push-method