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 information
|
||||||
|
|
||||||
VERSION_REV=7
|
VERSION_REV=7
|
||||||
VERSION_MAJOR=0
|
VERSION_MAJOR=1
|
||||||
VERSION_MINOR=0
|
VERSION_MINOR=0
|
||||||
|
|
||||||
## Start of generic script part
|
## Start of generic script part
|
||||||
@@ -61,7 +61,9 @@ helpApi() {
|
|||||||
echo
|
echo
|
||||||
echo " exep \"[COMMANDLINE]\""
|
echo " exep \"[COMMANDLINE]\""
|
||||||
echo " See exe, but support for pipes or redirects."
|
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
|
||||||
echo " addConf <OPTIONS> <CONFIGTEXT> <CONFIGFILE>"
|
echo " addConf <OPTIONS> <CONFIGTEXT> <CONFIGFILE>"
|
||||||
echo " Trying to write or append to a file."
|
echo " Trying to write or append to a file."
|
||||||
@@ -97,12 +99,15 @@ helpApi() {
|
|||||||
echo " getReturn"
|
echo " getReturn"
|
||||||
echo " Return last saved error code"
|
echo " Return last saved error code"
|
||||||
echo
|
echo
|
||||||
echo " endReturn [-f] [-o ERRORCODE] [MESSAGE]"
|
echo " endReturn [OPTIONS] [MESSAGE]"
|
||||||
echo " Notifys user that there was an error (previously saved by saveReturn,"
|
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 " or -o [ERRORCODE]) and asks to continue or end the sequence."
|
||||||
echo " Always exits with evaluated error code."
|
echo " Always exits with evaluated error code."
|
||||||
|
echo " [OPTIONS]"
|
||||||
echo " -f : force exit without user input, if error code is not 0"
|
echo " -f : force exit without user input, if error code is not 0"
|
||||||
echo " -o : override stored error code and check ERRORCODE"
|
echo " -o ERRORCODE : override stored error code and check ERRORCODE"
|
||||||
|
echo " [MESSAGE]"
|
||||||
|
echo " String which is displayed in the error output"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -557,10 +562,13 @@ showVersion() {
|
|||||||
exe() {
|
exe() {
|
||||||
local arr=("$@")
|
local arr=("$@")
|
||||||
if [ $DRY -ne 0 ] ; then
|
if [ $DRY -ne 0 ] ; then
|
||||||
echo "-- ${arr[@]}"
|
echo -n "--"
|
||||||
elif [ $VERBOSE -eq 1 ] ; then
|
fi
|
||||||
(set -x; "${arr[@]}")
|
if [ $DRY -ne 0 ] || [ $VERBOSE -eq 1 ] ; then
|
||||||
else
|
(set -x; : "${arr[@]}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $DRY -eq 0 ] ; then
|
||||||
"${arr[@]}"
|
"${arr[@]}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -569,9 +577,9 @@ exe() {
|
|||||||
# exep <COMMAND TO RUN AS STRING>
|
# exep <COMMAND TO RUN AS STRING>
|
||||||
exep() {
|
exep() {
|
||||||
if [ $DRY -ne 0 ] ; then
|
if [ $DRY -ne 0 ] ; then
|
||||||
echo "-- $1"
|
echo "--++ : $1"
|
||||||
elif [ $VERBOSE -eq 1 ] ; then
|
elif [ $VERBOSE -eq 1 ] ; then
|
||||||
echo "++ $1"
|
echo "++ : $1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $DRY -eq 0 ] ; then
|
if [ $DRY -eq 0 ] ; then
|
||||||
|
Reference in New Issue
Block a user