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
This commit is contained in:
2021-01-31 11:20:18 +01:00
parent 38c24693c9
commit 370a042c8b

View File

@@ -8,8 +8,8 @@
## Version information ## Version information
VERSION_REV=11 VERSION_REV=11
VERSION_MAJOR=0 VERSION_MAJOR=1
VERSION_MINOR=4 VERSION_MINOR=5
## Start of generic script part ## Start of generic script part
@@ -323,10 +323,11 @@ initSeqConfig() {
if [ ! -e "$SEQ_CONFIG_HOME/" ] ; then if [ ! -e "$SEQ_CONFIG_HOME/" ] ; then
echo -n " [I] Creating $(realpath $SEQ_CONFIG_HOME)..." echo -n " [I] Creating $(realpath $SEQ_CONFIG_HOME)..."
exe mkdir -p "$SEQ_CONFIG_HOME" && echo "Ok" || echo "Nok" exe mkdir -p "$SEQ_CONFIG_HOME" && echo "Ok" || echo "Nok"
exe chmod 700 "$SEQ_CONFIG_HOME"
fi fi
if [ -s "$configLoc" ] ; then 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" SEQ_CONFIG_FILE="$configLoc"
. "$configLoc" . "$configLoc"
return 0 return 0
@@ -349,6 +350,7 @@ initSeqConfig() {
exe cp -ar "$configTemplate" "$configLoc" exe cp -ar "$configTemplate" "$configLoc"
endReturn -o $? "Failed to create configuration" endReturn -o $? "Failed to create configuration"
exe chmod 600 "$configLoc"
if [ $sourceAlways -eq 0 ] ; then if [ $sourceAlways -eq 0 ] ; then
echoerr " [W] Seq configuration created from template but not used" echoerr " [W] Seq configuration created from template but not used"
@@ -369,6 +371,7 @@ initSeqConfig() {
# Create empty config file # Create empty config file
echo " [W] Created empty configuration file $configLoc" echo " [W] Created empty configuration file $configLoc"
exe touch "$configLoc" exe touch "$configLoc"
exe chmod 600 "$configLoc"
return 2 return 2
fi fi
@@ -893,8 +896,10 @@ main() {
done done
if [ -z "$1" ] || [ "$1" == "" ] ; then if [ -z "$1" ] || [ "$1" == "" ] ; then
# Empty -> show help if [ $QUIET -eq 0 ] ; then
displayHelp # Empty -> show help
displayHelp
fi
# Assume starting at one for interactive mode # Assume starting at one for interactive mode
START=1 START=1
else else
@@ -920,11 +925,6 @@ main() {
echoerr -e " [W] No sequence revision found. Trying anyway...\n"; echoerr -e " [W] No sequence revision found. Trying anyway...\n";
fi 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 if [ $DRY -ne 0 ] && [ $QUIET -eq 0 ] ; then
echo echo
echo " [W] Dry run active." echo " [W] Dry run active."
@@ -940,8 +940,8 @@ main() {
if [ $? -eq 0 ] ; then if [ $? -eq 0 ] ; then
checkStep "${START[0]}" checkStep "${START[0]}"
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo " [I] Configuring sequence (step_config) ..." if [ $QUIET -ne 2 ] ; then echo " [I] Configuring sequence (step_config) ..." ; fi
step_config step_config "${STEP_ARGS[@]}"
else else
return 1 return 1
fi fi