diff --git a/.config/bash/module/Save.sh b/.config/bash/module/Save.sh new file mode 100644 index 0000000..2a9f8e6 --- /dev/null +++ b/.config/bash/module/Save.sh @@ -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 +} diff --git a/.doc/Bash.md b/.doc/Bash.md index f399c5f..64ee3af 100644 --- a/.doc/Bash.md +++ b/.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 `|Burn specified iso file to DVD. +`cd_burn_iso `|Burn specified iso file to CD. +`cd_burn_audio `|Burn specified audio files to CD. +`dvd_shell`| Spawn Nix shell with required tools. + ## Ffmpeg. Command|Description @@ -346,6 +355,12 @@ Command|Description `recursive `|Run something recursively over all directories. `recursive1 `|Run something recursively over directories of 1 depth (excluding current dir). +## Save. + +Command|Description +---|--- +`save [TARGETS]`|Backup a game save. + ## Su. Command|Description