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