Problem 2315 - problem sourcing geant4.csh
Summary: problem sourcing geant4.csh
Status: CLOSED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: cmake (show other problems)
Version: 10.7
Hardware: All Linux
: P4 normal
Assignee: Ben Morgan
URL:
Depends on:
Blocks:
 
Reported: 2021-01-22 14:43 CET by Fran Peroni
Modified: 2021-01-26 11:28 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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.