From 163bcd2a8499860f9c974d5e31cb21ff9852df4e Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 27 May 2019 03:10:23 -0600 Subject: [PATCH] read file listing extra locations to backup --- backup_new.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/backup_new.sh b/backup_new.sh index 35b5124..b69ed98 100755 --- a/backup_new.sh +++ b/backup_new.sh @@ -462,6 +462,25 @@ else export BORG_PASSPHRASE="DummyPasswordSoBorgFails" fi +## read additional files +if [ -n "${borgXtraListPath}" ]; then + # check if file actually exists + if [ ! -f "${borgXtraListPath}" ]; then + badDetails dne 'borgXtraListPath' + fi + # read file contents into concatenated list for echo to cmdline + while read -r xtraItem; do + if [ -z "${xtraList}" ]; then + xtraList="${xtraItem}" + else + xtraList="${xtraList} ${xtraItem}" + fi + done <