Save : Return the save feature.
This commit is contained in:
parent
5c0db01cbf
commit
57af2b88df
19
.config/linux/system/module/common/bash/module/Save.sh
Normal file
19
.config/linux/system/module/common/bash/module/Save.sh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# 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..."
|
||||||
|
try rcp "${files[@]}" home:/storage/cold_1/backup/save/
|
||||||
|
|
||||||
|
_info "Cleaning..."
|
||||||
|
archive_prune
|
||||||
|
}
|
Reference in a new issue