From 00aac26be89be59a62127f407b494be632328b48 Mon Sep 17 00:00:00 2001 From: Malte Voos Date: Thu, 4 Apr 2024 23:37:52 +0200 Subject: use rsync instead of scp --- flake.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 837cb0b..31585b4 100644 --- a/flake.nix +++ b/flake.nix @@ -144,12 +144,11 @@ client = pkgs.writeShellApplication { name = "reMder-client"; - runtimeInputs = with pkgs; [ curl openssh sshpass ]; + runtimeInputs = with pkgs; [ curl openssh sshpass rsync ]; text = let ssh = "sshpass -p ${sshPassword} ssh -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p ${toString sshPort}"; - scp = "sshpass -p ${sshPassword} scp -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P ${toString sshPort}"; guest = "root@127.0.0.1"; documentDir = "/home/root/.local/share/remarkable/xochitl"; in @@ -162,7 +161,7 @@ ${ssh} ${guest} rm -rf ${documentDir} ${ssh} ${guest} mkdir ${documentDir} - ${scp} "$in" ${guest}:${documentDir} + rsync --rsh="${ssh}" "$in" ${guest}:${documentDir} ${ssh} ${guest} unzip "${documentDir}/$in_basename" -d ${documentDir} doc_id="$(${ssh} ${guest} find ${documentDir} -mindepth 1 -type d ! -name '\*.\*' -exec basename {} '\;')" -- cgit 1.4.1