Problem 2315

Summary: problem sourcing geant4.csh
Product: Geant4 Reporter: Fran Peroni <franperonig>
Component: cmakeAssignee: Ben Morgan <Ben.Morgan>
Status: CLOSED INVALID    
Severity: normal    
Priority: P4    
Version: 10.7   
Hardware: All   
OS: Linux   

Description Fran Peroni 2021-01-22 14:43:45 CET
Hi. Sorry, I'm new here. I've been installing Geant4 in my computer with Ubuntu 20.04. Everything okay until I try to source the geant4.csh file. I get these error codes:


fran@fran:~/geant4.10.07/geant4-install/bin$ source geant4.csh
bash: geant4.csh: line 27: syntax error near unexpected token `('
bash: geant4.csh: line 27: `set ARGS=($_)'


I checked the file and it's like this in the 24 to 32 lines:


unset g4sls_sourced_dir
unset geant4_envbindir

set ARGS=($_)
if ("$ARGS" != "") then
  if ("$ARGS[2]" =~ */geant4.csh) then
    set g4sls_sourced_dir="`dirname ${ARGS[2]}`"
  endif
endif


I'd be very thankful to receive possible solutions.
Comment 1 Ben Morgan 2021-01-26 11:28:33 CET
It looks like your shell is bash (the default on Ubuntu), so sourcing geant4.csh won't work as that's for the C shell. 

Instead, you'll need to source the geant4.sh script in the same directory.