From 57cf0824d45615fe1857a6fd04dba09be62633db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Sun, 31 Jul 2016 14:50:42 +0200 Subject: Add command store_ssh --- backuper.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backuper.sh b/backuper.sh index c4797b5..12c2130 100644 --- a/backuper.sh +++ b/backuper.sh @@ -157,6 +157,19 @@ store_file() { store "sh -c 'cat > ${DST}/${FILENAME}'" } +## This is not standart feature but it is common for several project I know +store_ssh() { + [ -z "$1" ] && error "Specify server" + CONNECTION="$1" + + add_custom_stage "echo_and_copy "$FILENAME"" + store "ssh "$CONNECTION"" +} + +echo_and_copy() { + echo "$1" ; cat +} + add_custom_stage() { echo "$@" >> "$RUNDIR"/"$CUSTOM_STAGE_FILE" } -- cgit v1.2.3