app_test/.github/rsync.sh
L3D 4827f6b740
Some checks failed
Build / Build for Android (push) Failing after 14s
coreutils
2023-05-12 00:59:18 +02:00

21 lines
495 B
Bash

#! /usr/bin/env bash
set -Eeuo pipefail
set -x
apt-get update -y && apt-get install -y rsync openssh-client keychain coreutils
# README.md /tmp/ files.l3d.ch files ./secret_ssh_key
printf "Add SSH Private Key"
mkdir ~/.ssh
chmod 700 ~/.ssh
cat $5 | sha256sum
mv $5 ~/.ssh/id_ed25519
chmod 400 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 $3 | tee -a ~/.ssh/known_hosts
printf "Adding SSH to chain"
eval $(keychain --eval --quiet id_ed25519)
printf "Starting rsync"
rsync --progress $1 $4@$3:$2