ebackup - Adapt to new sequencer options

This commit is contained in:
2022-06-14 11:10:44 +02:00
parent 26532b3fd3
commit 1116b6082c

View File

@@ -68,7 +68,7 @@ step_1() {
echo " [I] Running backup profile [$seq_profileName]"
if [ "${dupArgs[0]}" != "full" ] && [ ! -z "$EBU_MAX_FULLBKP_AGE" ] ; then
if [ "${dupArgs[0]:-}" != "full" ] && [ ! -z "$EBU_MAX_FULLBKP_AGE" ] ; then
dupArgs+=(--full-if-older-than "$EBU_MAX_FULLBKP_AGE")
fi
if [ ! -z "$EBU_VOLSIZE" ] ; then
@@ -77,7 +77,7 @@ step_1() {
checkInstalled
setPassphrase
exe $toolBin "${dupArgs[@]}" "$EBU_SOURCE" "$EBU_TARGET"
exe $toolBin "${dupArgs[@]:-}" "${EBU_SOURCE:?}" "${EBU_TARGET:?}"
retVal=$?
unsetPassphrase
@@ -192,9 +192,7 @@ step_20_alias() { echo 'status'; }
step_20() {
shift
local ebuTarget="$EBU_TARGET"
if [ -n "${1:-}" ] ; then
ebuTarget="$1"
fi
[[ -n "${1:-}" ]] && ebuTarget="$1"
checkInstalled
exe $toolBin collection-status "$ebuTarget"
@@ -288,7 +286,7 @@ step_100() {
}
setPassphrase() {
if [ -z $PASSPHRASE ] && [ ! -z $EBU_PASSPHRASE ] ; then
if [ -z "${PASSPHRASE:-}" ] && [ ! -z "${EBU_PASSPHRASE:-}" ] ; then
export PASSPHRASE="$EBU_PASSPHRASE"
fi
}
@@ -299,7 +297,7 @@ unsetPassphrase() {
checkFileHead() {
local readChar
if [ ! -e "$1" ] ; then
if [ ! -e "${1:-}" ] ; then
error -e "File $1 not found"
return 1
fi
@@ -311,7 +309,7 @@ checkFileHead() {
}
syslogEntry() {
if [ "$EBU_SYSLOG" == "true" ] ; then
if [[ "${EBU_SYSLOG:-}" == "true" ]] ; then
exe logger -t $toolSyslogTag "$@"
fi
}
@@ -322,7 +320,7 @@ checkInstalled() {
if [ $? -ne 0 ] ; then
step install
fi
toolBin="$EBU_PRECMD $(command -v $toolName)"
toolBin="${EBU_PRECMD:-} $(escpath "$(command -v $toolName)")"
fi
}