Compare commits
2 Commits
8722afe2c8
...
master
Author | SHA1 | Date | |
---|---|---|---|
f9540cc065
|
|||
945a5ea3dd
|
@@ -29,12 +29,14 @@ if [ -n "$BACKUP_HELPER_COMMANDS" ]; then
|
||||
for pair in "${pairs[@]}"; do
|
||||
IFS=":" read -r key value <<< "$pair"
|
||||
|
||||
if ! output=$(restic backup --stdin-filename "$key" --stdin-from-command -- "$value"); then
|
||||
# Split value into array of command args
|
||||
IFS=' ' read -r -a cmd_parts <<< "$value"
|
||||
if ! output=$(restic backup --stdin-filename "$key" --stdin-from-command -- "${cmd_parts[@]}"); then
|
||||
exit_code=1;
|
||||
echo "Backup of $i failed with exit code $?:"
|
||||
echo "Backup of $key failed with exit code $?:"
|
||||
echo "$output"
|
||||
else
|
||||
echo "Backup of $i successful:"
|
||||
echo "Backup of $key successful:"
|
||||
echo "$output"
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user