Save : Add game save script.

This commit is contained in:
Dmitry Voronin 2024-02-23 13:36:59 +03:00
parent b46db84de9
commit a276c7c99b
2 changed files with 34 additions and 0 deletions

View 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..."
rcp "${files[@]}" home:/storage/cold_1/backup/save/
_info "Cleaning..."
archive_prune
}

View file

@ -149,6 +149,15 @@ Command|Description
---|--- ---|---
`doc_bash`|Generate a markdown file with all the help info. Outputs to `~/.doc/Bash.md`. `doc_bash`|Generate a markdown file with all the help info. Outputs to `~/.doc/Bash.md`.
## Dvd.
Command|Description
---|---
`dvd_burn_iso <FILE.iso>`|Burn specified iso file to DVD.
`cd_burn_iso <FILE.iso>`|Burn specified iso file to CD.
`cd_burn_audio <FILES.wav>`|Burn specified audio files to CD.
`dvd_shell`| Spawn Nix shell with required tools.
## Ffmpeg. ## Ffmpeg.
Command|Description Command|Description
@ -346,6 +355,12 @@ Command|Description
`recursive <COMMAND>`|Run something recursively over all directories. `recursive <COMMAND>`|Run something recursively over all directories.
`recursive1 <COMMAND>`|Run something recursively over directories of 1 depth (excluding current dir). `recursive1 <COMMAND>`|Run something recursively over directories of 1 depth (excluding current dir).
## Save.
Command|Description
---|---
`save [TARGETS]`|Backup a game save.
## Su. ## Su.
Command|Description Command|Description