Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
7591cab6
Commit
7591cab6
authored
19 years ago
by
Marcel Loose
Browse files
Options
Downloads
Patches
Plain Diff
%[ER: 253]%
Added check for valid $a_root. Fixed bug when cd is an alias.
parent
9ac45319
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LCS/Tools/src/lofarinit.csh
+31
-24
31 additions, 24 deletions
LCS/Tools/src/lofarinit.csh
with
31 additions
and
24 deletions
LCS/Tools/src/lofarinit.csh
+
31
−
24
View file @
7591cab6
...
@@ -28,34 +28,41 @@
...
@@ -28,34 +28,41 @@
# The actual value is filled in by make install (see Makefile.am).
# The actual value is filled in by make install (see Makefile.am).
set a_root = . #filled in by install
set a_root = . #filled in by install
# First strip the current LOFARROOT from PATH and LD_LIBRARY_PATH
# Only modify path variables if $a_root is an existing directory.
# Take care that a possible . is preceeded by a backslash.
if (! (-d $a_root) ) then
if ($?LOFARROOT) then
echo "LOFAR root directory $a_root does not exist"
else
# First strip the current LOFARROOT from PATH and LD_LIBRARY_PATH
# Take care that a possible . is preceeded by a backslash.
if ($?LOFARROOT) then
set a_path = `echo $LOFARROOT | sed -e 's/\./\\\./g'`
set a_bin = "$a_path/bin"
setenv PATH `echo $PATH | sed -e "s%:${a_bin}:%:%g" -e "s%^${a_bin}:%%" -e "s%:${a_bin}"'$%%' -e "s%^${a_bin}"'$%%'`
set a_lib = "$a_path/lib"
setenv LD_LIBRARY_PATH `echo $LD_LIBRARY_PATH | sed -e "s%:${a_lib}:%:%g" -e "s%^${a_lib}:%%" -e "s%:${a_lib}"'$%%' -e "s%^${a_lib}"'$%%'`
endif
# Now define the new LOFARROOT
setenv LOFARROOT `cd >/dev/null $a_root; pwd` # make path absolute
# Also strip this path from the current paths (in case it is contained in
# it).
set a_path = `echo $LOFARROOT | sed -e 's/\./\\\./g'`
set a_path = `echo $LOFARROOT | sed -e 's/\./\\\./g'`
set a_bin = "$a_path/bin"
set a_bin = "$a_path/bin"
setenv PATH `echo $PATH | sed -e "s%:${a_bin}:%:%g" -e "s%^${a_bin}:%%" -e "s%:${a_bin}"'$%%' -e "s%^${a_bin}"'$%%'`
setenv PATH `echo $PATH | sed -e "s%:${a_bin}:%:%g" -e "s%^${a_bin}:%%" -e "s%:${a_bin}"'$%%' -e "s%^${a_bin}"'$%%'`
set a_lib = "$a_path/lib"
set a_lib = "$a_path/lib"
setenv LD_LIBRARY_PATH `echo $LD_LIBRARY_PATH | sed -e "s%:${a_lib}:%:%g" -e "s%^${a_lib}:%%" -e "s%:${a_lib}"'$%%' -e "s%^${a_lib}"'$%%'`
setenv LD_LIBRARY_PATH `echo $LD_LIBRARY_PATH | sed -e "s%:${a_lib}:%:%g" -e "s%^${a_lib}:%%" -e "s%:${a_lib}"'$%%' -e "s%^${a_lib}"'$%%'`
endif
# Add the path to the standard paths.
# Now define the new LOFARROOT
if (! $?PATH) then
setenv LOFARROOT `cd $a_root; pwd` # make path absolute
setenv PATH $LOFARROOT/bin
else
setenv PATH $LOFARROOT/bin:$PATH
endif
if (! $?LD_LIBRARY_PATH) then
setenv LD_LIBRARY_PATH $LOFARROOT/lib
else
setenv LD_LIBRARY_PATH $LOFARROOT/lib:$LD_LIBRARY_PATH
endif
# Also strip this path from the current paths (in case it is contained in it).
set a_path = `echo $LOFARROOT | sed -e 's/\./\\\./g'`
set a_bin = "$a_path/bin"
setenv PATH `echo $PATH | sed -e "s%:${a_bin}:%:%g" -e "s%^${a_bin}:%%" -e "s%:${a_bin}"'$%%' -e "s%^${a_bin}"'$%%'`
set a_lib = "$a_path/lib"
setenv LD_LIBRARY_PATH `echo $LD_LIBRARY_PATH | sed -e "s%:${a_lib}:%:%g" -e "s%^${a_lib}:%%" -e "s%:${a_lib}"'$%%' -e "s%^${a_lib}"'$%%'`
# Add the path to the standard paths.
if (! $?PATH) then
setenv PATH $LOFARROOT/bin
else
setenv PATH $LOFARROOT/bin:$PATH
endif
if (! $?LD_LIBRARY_PATH) then
setenv LD_LIBRARY_PATH $LOFARROOT/lib
else
setenv LD_LIBRARY_PATH $LOFARROOT/lib:$LD_LIBRARY_PATH
endif
endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment