github.com/pachyderm/pachyderm@v1.13.4/etc/testing/testctl-rsync.sh (about)

     1  #!/bin/bash
     2  set -euo pipefail
     3  IP=$(grep "##EXTERNAL_IP=" "$KUBECONFIG" |cut -d '=' -f 2-)
     4  PORT=$(grep "##SSH_FORWARDED_PORT=" "$KUBECONFIG" |cut -d '=' -f 2-)
     5  grep "##PRIVATE_KEY_ONELINER=" "$KUBECONFIG" |cut -d '=' -f 2- |base64 -d > id_rsa
     6  chmod 0600 id_rsa
     7  local_path="$1"
     8  remote_path="$2"
     9  exec rsync -a --delete -e "ssh -i $(pwd)/id_rsa -p $PORT -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" "$local_path" root@"$IP":"$remote_path"