Bump sequencer version to 7.1.0
Update verbose and dry-run handling. Using bash ":" build-in function Small helpapi update
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
## Version information
|
||||
|
||||
VERSION_REV=7
|
||||
VERSION_MAJOR=0
|
||||
VERSION_MAJOR=1
|
||||
VERSION_MINOR=0
|
||||
|
||||
## Start of generic script part
|
||||
@@ -61,7 +61,9 @@ helpApi() {
|
||||
echo
|
||||
echo " exep \"[COMMANDLINE]\""
|
||||
echo " See exe, but support for pipes or redirects."
|
||||
echo " Since the command line is given as string all apostrophes need to be esacped."
|
||||
echo " Important:"
|
||||
echo " - Shell commands cd, read, ... won't work because COMMANDLINE is started in a new shell."
|
||||
echo " - All apostrophes need to be esacped since the command line is given as string."
|
||||
echo
|
||||
echo " addConf <OPTIONS> <CONFIGTEXT> <CONFIGFILE>"
|
||||
echo " Trying to write or append to a file."
|
||||
@@ -97,12 +99,15 @@ helpApi() {
|
||||
echo " getReturn"
|
||||
echo " Return last saved error code"
|
||||
echo
|
||||
echo " endReturn [-f] [-o ERRORCODE] [MESSAGE]"
|
||||
echo " endReturn [OPTIONS] [MESSAGE]"
|
||||
echo " Notifys user that there was an error (previously saved by saveReturn,"
|
||||
echo " or -o [ERRORCODE]) and asks to continue or end the sequence."
|
||||
echo " Always exits with evaluated error code."
|
||||
echo " -f : force exit without user input, if error code is not 0"
|
||||
echo " -o : override stored error code and check ERRORCODE"
|
||||
echo " [OPTIONS]"
|
||||
echo " -f : force exit without user input, if error code is not 0"
|
||||
echo " -o ERRORCODE : override stored error code and check ERRORCODE"
|
||||
echo " [MESSAGE]"
|
||||
echo " String which is displayed in the error output"
|
||||
echo
|
||||
}
|
||||
|
||||
@@ -557,10 +562,13 @@ showVersion() {
|
||||
exe() {
|
||||
local arr=("$@")
|
||||
if [ $DRY -ne 0 ] ; then
|
||||
echo "-- ${arr[@]}"
|
||||
elif [ $VERBOSE -eq 1 ] ; then
|
||||
(set -x; "${arr[@]}")
|
||||
else
|
||||
echo -n "--"
|
||||
fi
|
||||
if [ $DRY -ne 0 ] || [ $VERBOSE -eq 1 ] ; then
|
||||
(set -x; : "${arr[@]}")
|
||||
fi
|
||||
|
||||
if [ $DRY -eq 0 ] ; then
|
||||
"${arr[@]}"
|
||||
fi
|
||||
}
|
||||
@@ -569,9 +577,9 @@ exe() {
|
||||
# exep <COMMAND TO RUN AS STRING>
|
||||
exep() {
|
||||
if [ $DRY -ne 0 ] ; then
|
||||
echo "-- $1"
|
||||
echo "--++ : $1"
|
||||
elif [ $VERBOSE -eq 1 ] ; then
|
||||
echo "++ $1"
|
||||
echo "++ : $1"
|
||||
fi
|
||||
|
||||
if [ $DRY -eq 0 ] ; then
|
||||
|
Reference in New Issue
Block a user