Fix unbound variable errors

This commit is contained in:
2022-06-02 16:08:07 +02:00
parent a6eeccb417
commit 4f8c1b5388
15 changed files with 85 additions and 86 deletions

View File

@@ -54,21 +54,21 @@ step_3_info() {
local tar="<TARGET>"
local exc="[EXCLUDES...]"
shift
if [ "$1" == "-t" ] ; then
if [ "${1:-}" == "-t" ] ; then
opt=" -t "
tar=
shift
fi
if [ ! -z "$1" ] ; then
if [ -n "${1:-}" ] ; then
dir="$1"
shift
if [ ! -z $tar ] && [ ! -z "$1" ] ; then
if [ -n $tar ] && [ -n "$1" ] ; then
tar="$1"
shift
else
tar="$BACKUP_TARGET"
fi
if [ ! -z "$1" ] ; then
if [ -n "${1:-}" ] ; then
exc="$@"
else
exc="[NO EXCLUDES]"
@@ -83,7 +83,6 @@ step_3_info() {
}
step_3_alias() { echo "budir"; }
step_3() {
local arg
local configTarget=0
local noRemount=0
local buSource=
@@ -93,7 +92,7 @@ step_3() {
# don't use step number
shift
for arg in "$@"; do
for _ in "$@"; do
case "$1" in
-t)
configTarget=1