Save : Add game save script.
This commit is contained in:
parent
b46db84de9
commit
a276c7c99b
19
.config/bash/module/Save.sh
Normal file
19
.config/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..."
|
||||
rcp "${files[@]}" home:/storage/cold_1/backup/save/
|
||||
|
||||
_info "Cleaning..."
|
||||
archive_prune
|
||||
}
|
15
.doc/Bash.md
15
.doc/Bash.md
|
@ -149,6 +149,15 @@ Command|Description
|
|||
---|---
|
||||
`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.
|
||||
|
||||
Command|Description
|
||||
|
@ -346,6 +355,12 @@ Command|Description
|
|||
`recursive <COMMAND>`|Run something recursively over all directories.
|
||||
`recursive1 <COMMAND>`|Run something recursively over directories of 1 depth (excluding current dir).
|
||||
|
||||
## Save.
|
||||
|
||||
Command|Description
|
||||
---|---
|
||||
`save [TARGETS]`|Backup a game save.
|
||||
|
||||
## Su.
|
||||
|
||||
Command|Description
|
||||
|
|
Reference in a new issue