various
This commit is contained in:
parent
b057929c56
commit
5d67f27a7e
2 changed files with 11 additions and 2 deletions
|
@ -114,6 +114,8 @@ function invoke_script() {
|
|||
|
||||
export -f backup_dir
|
||||
export -f backup_dumps
|
||||
export -f backup_files
|
||||
export -f create_tmp_file
|
||||
export -f die
|
||||
export -f forget_backup
|
||||
export -f get_config_dir
|
||||
|
@ -144,7 +146,7 @@ function invoke_script() {
|
|||
function backup_files() {
|
||||
patterns="$1"
|
||||
args="${@:2}"
|
||||
files_from_path="/tmp/files-from" # TODO: Helper function for this
|
||||
files_from_path="$(create_tmp_file "files-from")"
|
||||
|
||||
echo "$patterns" > "$files_from_path"
|
||||
sed -i -e 's/:/\n/g' "$files_from_path"
|
||||
|
@ -187,7 +189,7 @@ function backup_dir() {
|
|||
if [[ ! -d "$path" ]]; then
|
||||
say warning "'$path' does not exist. Not backing up"
|
||||
else
|
||||
files "$path" $args
|
||||
backup_files "$path" $args
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue