Project

General

Profile

Bug #6699

Better checking of setupnova command line

Added by Christopher Backhouse over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
07/28/2014
Due date:
% Done:

100%

Estimated time:
Duration:

Description

If you do
$ setupnova S14-07-18 # note the missing -r
Then the setupnova script happily gives you development.

I would expect an error message, like "S14-07-18: unknown switch". That would have saved me a few hours of confusion...

History

#1 Updated by Kanika Sachdev over 5 years ago

As of yesterday, when setup_novasoft_setup.sh is sourced by setup_novasoft.sh, it prints the following line:

sourcing setup from /grid/fermiapp/nova/novaart/novasvn/releases/${SRT_BASE_RELEASE}/setup/setup_novasoft_setup.sh

indicating which base release is being setup. While this doesn't catch your error, it does inform you of what is being setup. Is that not enough?

#2 Updated by Christopher Backhouse over 5 years ago

My eyes read right past the output of my next line, which was "echo $SRT_PUBLIC_CONTEXT", so apparently not :(

#3 Updated by Gavin Davies over 5 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

This is more robust now with my recent changes to the setup scripts.
If you accidentally forget the -r option (or any other option for that matter) but pass the argument it will throw an Error (in red) and give you the usage options.

Also if you pass multiple options and intersperse a mistake this will get picked up too.

[novasoft@novagpvm05 ~]$ setup_nova S14
sourcing setup from /grid/fermiapp/nova/novaart/novasvn/setup/setup_novasoft_setup.sh
ERROR! Invalid argument/option. Try again!

usage: setup_novasoft_setup.sh [options]
options:
-h, --help: prints this usage message
-c: Use c-shell
-s: Use sh-shell (standard)
-r, --release: specifies the release to be set up
-b, --build: specifies the build (debug/prof/maxopt)

You either requested the help or setup has failed. Try again!

Release:

Build:

#4 Updated by Gavin Davies over 5 years ago

I should add that the real error checking will only work in development and future tags henceforth because it's updated in setup_novasoft_setup.sh and tags source their own version.

#5 Updated by Gavin Davies about 5 years ago

  • Status changed from Resolved to Closed

New setup script correctly handles and flags setup errors.



Also available in: Atom PDF