Sequencer new option to open sequence config file when initialised using initSeqConfig

Sequences with exit in step_config, changed to return to support opening config file on first run
This commit is contained in:
2021-03-19 01:32:59 +01:00
parent ab1f9f761e
commit 8e63bbe7df
10 changed files with 41 additions and 30 deletions

View File

@@ -20,7 +20,7 @@ step_config() {
if [ $? -eq 0 ] ; then
CONFIG=1
else
exit 1
[ $DRY -eq 0 ] && return 1
fi
toolSyslogTag="${SCRIPT_NAME}-$SEQ_PROFILE_NAME"
}
@@ -56,14 +56,14 @@ step_1() {
if [ -z $EBU_TARGET ] || [ -z $EBU_SOURCE ] ; then
echo " [I] Nothing to do. Check $SEQ_CONFIG_FILE"
return -1
return 1
fi
if [ ! -z "$1" ] && ( [ "$1" == "full" ] || [ "$1" == "incremental" ] ) ; then
dupArgs+=("$1")
elif [ ! -z "$1" ] ; then
echo " [W] $toolName command \"$1\" not recognized"
return -1
return 1
fi
echo " [I] Running backup profile [$SEQ_PROFILE_NAME]"
@@ -95,7 +95,7 @@ step_3() {
if [ -z $EBU_TARGET ] || [ -z $EBU_SOURCE ] ; then
echo " [I] Nothing to do. Check $SEQ_CONFIG_FILE"
return -1
return 1
fi
checkInstalled
@@ -135,7 +135,7 @@ step_5() {
if [ -z "$1" ] ; then
echoerr " [E] No target provided"
return -1
return 1
fi
local ebuLocalTarget="$1"
local ebuTarget="$EBU_TARGET"
@@ -167,7 +167,7 @@ step_7() {
dupCommand+="remove-all-inc-of-but-n-full $EBU_MAX_FULLS_WITH_INCRS "
else
if [ $QUIET -eq 0 ] ; then echoerr " [W] No purge option configured" ; fi
return -1
return 1
fi
checkInstalled
@@ -264,12 +264,6 @@ step_72() {
done
}
step_74_info() { echo "Open configuration file"; }
step_74_alias() { ALIAS='config'; }
step_74() {
exe vi "$SEQ_CONFIG_FILE"
}
step_100_info() { echo "Install $toolName $toolPpa"; }
step_100_alias() { ALIAS="install"; }
step_100() {
@@ -296,7 +290,7 @@ checkFileHead() {
local readChar
if [ ! -e "$1" ] ; then
echoerr " [E] File $1 not found"
return -1
return 1
fi
read -r -n ${#2} readChar < "$1"
if [ "$readChar" == "$2" ] ; then