Skip to Content.
Sympa Menu

sphenix-software-l - [Sphenix-software-l] OFFLINE_MAIN is not setup correctly by bash setup script

sphenix-software-l AT lists.bnl.gov

Subject: sPHENIX discussion of software

List archive

Chronological Thread  
  • From: bxia <bxia AT rcf.rhic.bnl.gov>
  • To: sphenix-software-l AT lists.bnl.gov
  • Subject: [Sphenix-software-l] OFFLINE_MAIN is not setup correctly by bash setup script
  • Date: Thu, 19 Dec 2019 21:07:58 -0500

Hi, software administrators and bash users,

Today I found OFFLINE_MAIN was not set up correctly after sourcing /opt/sphenix/core/bin/sphenix_setup.sh. So I took a look into this script, and one line caught my attention. In Line 130, this test goes into the "else" cluase in today's environment setting. I know little about sPHENIX directory structure, so I'm not sure if this is the intension of this script. But this bahavior is a little tricky when the variable is not set or empty (I mean a string of zero length) in the test. It's worthy a mention. According to bash's manpage, this result should be the same as the non-POSIX [[ ]], but these two give different results. I know bash's behavior changes with versions sometimes, so this test might have behaved differently in previous version.

Also, I found a bug which is irrelavent to this issue. Line 59 tries to get the base directory set by users, however this should be placed inside the case when -b is given. If not, by the end of the day, we get "ne" in Line 3 when -b is not set by users. If there is a directory "ne" in the current directory by change (usually it is our home directory), the bug will surface at the test in Line 134.

Thank you for taking time for this and for providing an official bash setup script.

Bing




Archive powered by MHonArc 2.6.24.

Top of Page