feat: Add tar compression selection
This commit is contained in:
@ -20,7 +20,8 @@ __version='0.0.0'
|
||||
__config=
|
||||
__verbose=
|
||||
__log_file='./log.txt'
|
||||
__tar_options='-czf'
|
||||
__tar_options='-acf'
|
||||
__tar_compression='gzip'
|
||||
__name_date_fmt='_%Y%m%d-%H%M'
|
||||
|
||||
if [ -n "$BAFLIB" ]; then
|
||||
@ -121,10 +122,10 @@ log "Backup STARTED"
|
||||
log -p "Configuration file: $([ "$__config" ] || echo not specified && echo "$__config")"
|
||||
log "Scripts to process (${_count}): ${__args[@]}"
|
||||
|
||||
# TODO source config
|
||||
|
||||
for script in "${__args[@]}"; do
|
||||
source_script "$script"
|
||||
#. "$__config" # TODO Make it safe!
|
||||
|
||||
echo
|
||||
echo -e "\e[1m==> Script: ${__args[_iter-1]##*/} [$_iter/$_count]\e[0m" | log -p
|
||||
@ -162,6 +163,7 @@ for script in "${__args[@]}"; do
|
||||
|
||||
# Unset user defined variables
|
||||
unset tar_options
|
||||
unset tar_compression
|
||||
unset name_date_fmt
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user