This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/Save.sh

20 lines
381 B
Bash
Raw Normal View History

2024-02-23 13:36:59 +03:00
# Backup a game save.
# Usage: save [TARGETS]
function save() {
local IFS=$'\n'
local targets=("${@}")
local files=()
[[ "${targets}" = "" ]] && targets=($(_ls_dir))
_info "Archiving..."
for target in ${targets[@]}; do
files+=($(archive "${target}"))
done
_info "Uploading..."
rcp "${files[@]}" home:/storage/cold_1/backup/save/
_info "Cleaning..."
archive_prune
}