Skip to content
GitLab
Explore
Sign in
Register
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
9ac45319
Commit
9ac45319
authored
19 years ago
by
Ger van Diepen
Browse files
Options
Downloads
Patches
Plain Diff
%[ER: 253]%
Check if root directory exists
parent
3569d7fb
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.sh
+26
-22
26 additions, 22 deletions
LCS/Tools/src/lofarinit.sh
with
26 additions
and
22 deletions
LCS/Tools/src/lofarinit.sh
+
26
−
22
View file @
9ac45319
...
@@ -41,28 +41,32 @@ if [ "$LOFARROOT" != "" ]; then
...
@@ -41,28 +41,32 @@ if [ "$LOFARROOT" != "" ]; then
fi
fi
# Now define the new LOFARROOT
# Now define the new LOFARROOT
LOFARROOT
=
`
cd
$a_root
;
pwd
`
# make path absolute
if
[
!
-d
$a_root
]
;
then
export
LOFARROOT
echo
"LOFAR root directory
$a_root
does not exist"
else
LOFARROOT
=
`
cd
$a_root
>
/dev/null
;
pwd
`
# make path absolute
export
LOFARROOT
# Also strip
this path
from the current paths (in case it is contained in it).
# Also strip
root
from the current paths (in case it is contained in it).
a_path
=
`
echo
$LOFARROOT
|
sed
-e
's/\./\\\./g'
`
a_path
=
`
echo
$LOFARROOT
|
sed
-e
's/\./\\\./g'
`
a_bin
=
"
$a_path
/bin"
a_bin
=
"
$a_path
/bin"
PATH
=
`
echo
$PATH
|
sed
-e
"s%:
$a_bin
:%:%g"
-e
"s%^
$a_bin
:%%"
-e
"s%:
$a_bin$%
%"
-e
"s%^
$a_bin$%
%"
`
PATH
=
`
echo
$PATH
|
sed
-e
"s%:
$a_bin
:%:%g"
-e
"s%^
$a_bin
:%%"
-e
"s%:
$a_bin$%
%"
-e
"s%^
$a_bin$%
%"
`
export
PATH
export
PATH
a_lib
=
"
$a_path
/lib"
a_lib
=
"
$a_path
/lib"
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$%
%"
`
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$%
%"
`
export
LD_LIBRARY_PATH
export
LD_LIBRARY_PATH
# Add the path to the standard paths.
# Add the path to the standard paths.
if
[
"
$PATH
"
=
""
]
;
then
if
[
"
$PATH
"
=
""
]
;
then
PATH
=
$LOFARROOT
/bin
PATH
=
$LOFARROOT
/bin
else
else
PATH
=
$LOFARROOT
/bin:
$PATH
PATH
=
$LOFARROOT
/bin:
$PATH
fi
fi
export
PATH
export
PATH
if
[
"
$LD_LIBRARY_PATH
"
=
""
]
;
then
if
[
"
$LD_LIBRARY_PATH
"
=
""
]
;
then
LD_LIBRARY_PATH
=
$LOFARROOT
/lib
LD_LIBRARY_PATH
=
$LOFARROOT
/lib
else
else
LD_LIBRARY_PATH
=
$LOFARROOT
/lib:
$LD_LIBRARY_PATH
LD_LIBRARY_PATH
=
$LOFARROOT
/lib:
$LD_LIBRARY_PATH
fi
export
LD_LIBRARY_PATH
fi
fi
export
LD_LIBRARY_PATH
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