BUG: cshrc: account for lsof printing mount point after files

Some versions of lsof print the mount point (if remote) after the
script path:
    /hosts/mymachine/OpenFOAM/OpenFOAM-plus.develop/etc/cshrc (mymachine:/home)
This now gets filtered out.
This commit is contained in:
mattijs
2017-05-25 10:43:57 +01:00
parent 4b20991841
commit 757cc7a15d

View File

@ -43,7 +43,7 @@ setenv WM_PROJECT_VERSION plus
# values to an appropriate path.
#
setenv FOAM_INST_DIR `lsof +p $$ |& \
sed -n -e 's@[^/]*@@' -e 's@/'$WM_PROJECT'[^/]*/etc/cshrc@@p'`
sed -n -e 's@[^/]*@@' -e 's@/'$WM_PROJECT'[^/]*/etc/cshrc.*@@p'`
# setenv FOAM_INST_DIR $HOME/$WM_PROJECT
# setenv FOAM_INST_DIR /opt/$WM_PROJECT
# setenv FOAM_INST_DIR /usr/local/$WM_PROJECT