I am not expert of bash scripting, but I really don't understand what is appening here. My script is this:
#!/usr/bin/env bash
echo "calling asetup"
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
asetup 17.6.0,slc5
echo "Now running..."
echo "argument $@"
I call it with as ./myscript -v, the output is:
calling asetup
atlasLocalSetup.sh: invalid option -- 'v'
'atlasLocalSetup.sh --help' for more information
./prova.sh: line 12: asetup: command not found
Now running...
argument -v
on the second line, what is atlasLocalSetup.sh: invalid option -- 'v'?? Why isatlasLocalSetup.sh called with the -v option?