diff --git a/LCS/Tools/src/lofarinit.csh.in b/LCS/Tools/src/lofarinit.csh.in index 2f4c654dc129faa3ef046631880a5f893bf41dab..99ca98599b945ce9b0c4c6b5ab0f30d1d3b11abd 100644 --- a/LCS/Tools/src/lofarinit.csh.in +++ b/LCS/Tools/src/lofarinit.csh.in @@ -70,7 +70,12 @@ else endif # Now define the new LOFARROOT - setenv LOFARROOT `cd >/dev/null $lfr_root; pwd` # make path absolute + # If not needed, do not do cd;pwd because that resolves symlinks. + if ( $lfr_root =~ /* ) then + setenv LOFARROOT $lfr_root + else + setenv LOFARROOT `cd >/dev/null $lfr_root; pwd` # make path absolute + endif # Also strip this path from the current paths (in case it is contained in # it).