sequencer - make use of test -n and for finish message
This commit is contained in:
@@ -373,7 +373,7 @@ endCheckEmpty() {
|
|||||||
eval 'local ref=$'$1
|
eval 'local ref=$'$1
|
||||||
|
|
||||||
if [ -z $ref ] ; then
|
if [ -z $ref ] ; then
|
||||||
if [ ! -z "$2" ] ; then
|
if [ -n "$2" ] ; then
|
||||||
echoerr -e " [E] $2\n Sequence stopped."
|
echoerr -e " [E] $2\n Sequence stopped."
|
||||||
else
|
else
|
||||||
echoerr -e " [E] $1 must not be empty.\n Sequence stopped."
|
echoerr -e " [E] $1 must not be empty.\n Sequence stopped."
|
||||||
@@ -765,7 +765,7 @@ execute() {
|
|||||||
existsFunction step_${1}_alias
|
existsFunction step_${1}_alias
|
||||||
[ $? -eq 0 ] && step_${1}_alias || ALIAS=
|
[ $? -eq 0 ] && step_${1}_alias || ALIAS=
|
||||||
printf "\n [%3d] " $1
|
printf "\n [%3d] " $1
|
||||||
if [ ! -z "$ALIAS" ]; then
|
if [ -n "$ALIAS" ]; then
|
||||||
echo -en "${ORANGE}$ALIAS${NC}${SAVE_POS_ALIAS}"
|
echo -en "${ORANGE}$ALIAS${NC}${SAVE_POS_ALIAS}"
|
||||||
# Only add newline if step info() available
|
# Only add newline if step info() available
|
||||||
existsFunction step_${1}_info
|
existsFunction step_${1}_info
|
||||||
@@ -1021,7 +1021,7 @@ displayHelp() {
|
|||||||
CONTEXT_HELP=1
|
CONTEXT_HELP=1
|
||||||
|
|
||||||
# check if help is requested for a single step
|
# check if help is requested for a single step
|
||||||
if [ ! -z "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
parseAlias
|
parseAlias
|
||||||
checkStep "$2"
|
checkStep "$2"
|
||||||
loopStart=$?
|
loopStart=$?
|
||||||
@@ -1035,7 +1035,7 @@ displayHelp() {
|
|||||||
loopEnd=$loopStart
|
loopEnd=$loopStart
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z $1 ] && [ $1 -eq 1 ] ; then
|
if [ -n "$1" ] && [ $1 -eq 1 ] ; then
|
||||||
createTemplate=0
|
createTemplate=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1157,7 +1157,7 @@ listSteps() {
|
|||||||
showVersion() {
|
showVersion() {
|
||||||
echo "Sequencer ${VERSION_STRING}"
|
echo "Sequencer ${VERSION_STRING}"
|
||||||
echo -n "Seq Revision "
|
echo -n "Seq Revision "
|
||||||
if [ ! -z "${VERSION_SEQREV}" ] ; then
|
if [ -n "${VERSION_SEQREV}" ] ; then
|
||||||
echo "${VERSION_SEQREV}"
|
echo "${VERSION_SEQREV}"
|
||||||
else
|
else
|
||||||
echo "-"
|
echo "-"
|
||||||
@@ -1277,13 +1277,13 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# compatibility check of sequence
|
# compatibility check of sequence
|
||||||
if [ ! -z $VERSION_SEQREV ] && [ $VERSION_SEQREV -gt $VERSION_REV ] ; then
|
if [ -n "$VERSION_SEQREV" ] && [ $VERSION_SEQREV -gt $VERSION_REV ] ; then
|
||||||
echoerr " [E] Unsupported sequence revision"
|
echoerr " [E] Unsupported sequence revision"
|
||||||
showVersion
|
showVersion
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# exclude older versions if needed
|
# exclude older versions if needed
|
||||||
if [ ! -z $VERSION_SEQREV ] && [ $VERSION_SEQREV -lt 3 ] ; then
|
if [ -n "$VERSION_SEQREV" ] && [ $VERSION_SEQREV -lt 3 ] ; then
|
||||||
echoerr " [E] Unsupported sequence revision (addConf)"
|
echoerr " [E] Unsupported sequence revision (addConf)"
|
||||||
showVersion
|
showVersion
|
||||||
exit 1
|
exit 1
|
||||||
@@ -1348,7 +1348,7 @@ main() {
|
|||||||
# Check for profile support
|
# Check for profile support
|
||||||
if [ $SEQ_PROFILE_LIST -ne 0 ]; then
|
if [ $SEQ_PROFILE_LIST -ne 0 ]; then
|
||||||
listProfiles; exit $?
|
listProfiles; exit $?
|
||||||
elif [ ! -z "$SEQ_PROFILE_NAME" ]; then
|
elif [ -n "$SEQ_PROFILE_NAME" ]; then
|
||||||
listProfiles -q || exit 1
|
listProfiles -q || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1367,7 +1367,7 @@ MAINRETURN=$?
|
|||||||
|
|
||||||
if [ $QUIET -ne 2 ] ; then
|
if [ $QUIET -ne 2 ] ; then
|
||||||
echo
|
echo
|
||||||
echo "${0##*/} finished"
|
echo "$SEQ_NAME finished"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $MAINRETURN;
|
exit $MAINRETURN
|
||||||
|
Reference in New Issue
Block a user