Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
cc65a342
Commit
cc65a342
authored
4 years ago
by
Ole Hansen
Committed by
Marko Petric
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
thisdd4hep.sh: Ensure that paths are always prepended
parent
702fbbb3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/thisdd4hep.sh
+3
-8
3 additions, 8 deletions
cmake/thisdd4hep.sh
cmake/thisdd4hep_only.sh
+3
-8
3 additions, 8 deletions
cmake/thisdd4hep_only.sh
with
6 additions
and
16 deletions
cmake/thisdd4hep.sh
+
3
−
8
View file @
cc65a342
...
...
@@ -34,14 +34,9 @@ dd4hep_add_path() {
path_name
=
${
1
}
path_prefix
=
${
2
}
eval
path_value
=
\$
$path_name
if
[
"
${
path_value
}
"
]
;
then
# Prevent duplicates
if
!
echo
${
path_value
}
|
tr
:
'\n'
|
grep
-q
"^
${
path_prefix
}
$"
;
then
path_value
=
"
${
path_prefix
}
:
${
path_value
}
"
fi
else
path_value
=
"
${
path_prefix
}
"
fi
;
# Prevent duplicates
path_value
=
`
echo
${
path_value
}
|
tr
:
'\n'
|
grep
-v
${
path_prefix
}
|
tr
'\n'
: |
sed
's|:$||'
`
path_value
=
"
${
path_prefix
}${
path_value
:+:
${
path_value
}}
"
eval export
${
path_name
}
=
'${path_value}'
unset
path_name path_prefix path_value
}
...
...
This diff is collapsed.
Click to expand it.
cmake/thisdd4hep_only.sh
+
3
−
8
View file @
cc65a342
...
...
@@ -36,14 +36,9 @@ dd4hep_add_path() {
path_name
=
${
1
}
path_prefix
=
${
2
}
eval
path_value
=
\$
$path_name
if
[
"
${
path_value
}
"
]
;
then
# Prevent duplicates
if
!
echo
${
path_value
}
|
tr
:
'\n'
|
grep
-q
"^
${
path_prefix
}
$"
;
then
path_value
=
"
${
path_prefix
}
:
${
path_value
}
"
fi
else
path_value
=
"
${
path_prefix
}
"
fi
;
# Prevent duplicates
path_value
=
`
echo
${
path_value
}
|
tr
:
'\n'
|
grep
-v
${
path_prefix
}
|
tr
'\n'
: |
sed
's|:$||'
`
path_value
=
"
${
path_prefix
}${
path_value
:+:
${
path_value
}}
"
eval export
${
path_name
}
=
'${path_value}'
unset
path_name path_prefix path_value
}
...
...
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