various
parent
4707b00867
commit
439e69fb78
|
@ -225,6 +225,7 @@ download_restic 0.16.0
|
|||
test_file "$restic_repo_file"
|
||||
test_file "$restic_repo_passwd_file"
|
||||
|
||||
if [[ -z "$1" || -f "$1" ]]; then
|
||||
if [[ -z "$1" ]]; then
|
||||
say info "Running backup scripts..."
|
||||
|
||||
|
@ -235,10 +236,19 @@ if [[ -z "$1" ]]; then
|
|||
for backup_script in $backup_scripts_dir/*; do
|
||||
invoke_script $backup_script
|
||||
done
|
||||
else
|
||||
say info "Running script: $(basename "$1")"
|
||||
invoke_script "$1"
|
||||
fi
|
||||
|
||||
say primary "$(repeat "-" 80)"
|
||||
elif [[ -f "$1" ]]; then
|
||||
invoke_script "$1"
|
||||
|
||||
invoke_restic snapshots \
|
||||
--compact \
|
||||
--latest 1 \
|
||||
--host "$host" \
|
||||
--tag "$(basename "$0")" \
|
||||
| sed -E ":begin;$!N;s/$(basename "$0")\n\s+?//;tbegin;P;D"
|
||||
else
|
||||
command="$1"
|
||||
arguments="${@:2}"
|
||||
|
|
Loading…
Reference in New Issue