From 370a042c8bd3bd013214ea5881ed9ee903bd481f Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Sun, 31 Jan 2021 11:20:18 +0100 Subject: [PATCH] Major: Doesn't stop with option -q(q) if now step is given. Major: Seqs config files are created with permissions 600 Minor: Further reduction of messages when using -qq --- sequencer/sequencer.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sequencer/sequencer.sh b/sequencer/sequencer.sh index 2960b27..0366d6c 100755 --- a/sequencer/sequencer.sh +++ b/sequencer/sequencer.sh @@ -8,8 +8,8 @@ ## Version information VERSION_REV=11 -VERSION_MAJOR=0 -VERSION_MINOR=4 +VERSION_MAJOR=1 +VERSION_MINOR=5 ## Start of generic script part @@ -323,10 +323,11 @@ initSeqConfig() { if [ ! -e "$SEQ_CONFIG_HOME/" ] ; then echo -n " [I] Creating $(realpath $SEQ_CONFIG_HOME)..." exe mkdir -p "$SEQ_CONFIG_HOME" && echo "Ok" || echo "Nok" + exe chmod 700 "$SEQ_CONFIG_HOME" fi if [ -s "$configLoc" ] ; then - echo " [I] Using configuration file: $configLoc" + if [ $QUIET -ne 2 ] ; then echo " [I] Using configuration file: $configLoc" ; fi SEQ_CONFIG_FILE="$configLoc" . "$configLoc" return 0 @@ -349,6 +350,7 @@ initSeqConfig() { exe cp -ar "$configTemplate" "$configLoc" endReturn -o $? "Failed to create configuration" + exe chmod 600 "$configLoc" if [ $sourceAlways -eq 0 ] ; then echoerr " [W] Seq configuration created from template but not used" @@ -369,6 +371,7 @@ initSeqConfig() { # Create empty config file echo " [W] Created empty configuration file $configLoc" exe touch "$configLoc" + exe chmod 600 "$configLoc" return 2 fi @@ -893,8 +896,10 @@ main() { done if [ -z "$1" ] || [ "$1" == "" ] ; then - # Empty -> show help - displayHelp + if [ $QUIET -eq 0 ] ; then + # Empty -> show help + displayHelp + fi # Assume starting at one for interactive mode START=1 else @@ -920,11 +925,6 @@ main() { echoerr -e " [W] No sequence revision found. Trying anyway...\n"; fi - # End here on quiet mode and no step was given - if [ $EMPTYCALL -ne 0 ] && [ $QUIET -ne 0 ] ; then - exit 1; - fi - if [ $DRY -ne 0 ] && [ $QUIET -eq 0 ] ; then echo echo " [W] Dry run active." @@ -940,8 +940,8 @@ main() { if [ $? -eq 0 ] ; then checkStep "${START[0]}" if [ $? -ne 0 ] ; then - echo " [I] Configuring sequence (step_config) ..." - step_config + if [ $QUIET -ne 2 ] ; then echo " [I] Configuring sequence (step_config) ..." ; fi + step_config "${STEP_ARGS[@]}" else return 1 fi