Make helper variables local to prefent side effects
This commit is contained in:
@@ -219,6 +219,7 @@ getReturn() {
|
||||
# MESSAGE : Custom error message
|
||||
#
|
||||
endReturn() {
|
||||
local arg
|
||||
local forceExit=0
|
||||
local errorCode=$ERNO
|
||||
local endMessage=""
|
||||
@@ -296,6 +297,7 @@ endReturn() {
|
||||
# 2 : Created empty configuration
|
||||
# 3 : No configuration created
|
||||
initSeqConfig() {
|
||||
local arg
|
||||
local sourceAlways=0
|
||||
local createEmpty=0
|
||||
for arg in "$@" ; do
|
||||
@@ -376,6 +378,7 @@ initSeqConfig() {
|
||||
# if exists, one attempt is made to create bck file of it
|
||||
# if all fails, a log file is created with the conflicts to be resolved by the user
|
||||
addConf() {
|
||||
local arg
|
||||
local confMode=""
|
||||
local transferCmd="echo"
|
||||
|
||||
@@ -598,6 +601,7 @@ step() {
|
||||
# (max $MAX_STEP)
|
||||
# execute sequence continously from given starting step
|
||||
continous() {
|
||||
local i
|
||||
local step=0
|
||||
|
||||
checkStep "$1"
|
||||
@@ -625,6 +629,7 @@ continous() {
|
||||
# execute given step list
|
||||
# e.g.: selection -q (1, 4, 12)
|
||||
selection() {
|
||||
local i
|
||||
local step=0
|
||||
local array=("$@")
|
||||
|
||||
@@ -695,6 +700,7 @@ createTemplate() {
|
||||
# back reference variable of schema:
|
||||
# alias_[ALIAS]=[STEP NUMBER]
|
||||
parseAlias() {
|
||||
local i
|
||||
for ((i=1; i<=${MAX_STEP}; i++)); do
|
||||
# Check for alias definition
|
||||
existsFunction step_${i}_alias
|
||||
@@ -715,6 +721,7 @@ parseAlias() {
|
||||
# 1 : Do not ask for template creation
|
||||
# Always display sequencer help and, if available, sequence help
|
||||
displayHelp() {
|
||||
local i
|
||||
local createTemplate=1
|
||||
local stepsFound=0
|
||||
CONTEXT_HELP=1
|
||||
@@ -827,6 +834,7 @@ exep() {
|
||||
}
|
||||
|
||||
main() {
|
||||
local arg
|
||||
local START=0
|
||||
local EMPTYCALL=1
|
||||
|
||||
|
Reference in New Issue
Block a user