Skip to content
Snippets Groups Projects
Commit 7d89a650 authored by Marko Petric's avatar Marko Petric
Browse files

add package argument to dd4hep_parse_this

parent 84c1df39
No related branches found
No related tags found
No related merge requests found
...@@ -11,13 +11,14 @@ ...@@ -11,13 +11,14 @@
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
dd4hep_parse_this() { dd4hep_parse_this() {
SOURCE=${1} SOURCE=${1}
package=${2};
if [ "x${SOURCE}" = "x" ]; then if [ "x${SOURCE}" = "x" ]; then
if [ -f bin/thisdd4hep.sh ]; then if [ -f bin/this${package}.sh ]; then
THIS="$PWD"; export THIS THIS="$PWD"; export THIS
elif [ -f ./thisdd4hep.sh ]; then elif [ -f ./this${package}.sh ]; then
THIS=$(cd .. > /dev/null; pwd); export THIS THIS=$(cd .. > /dev/null; pwd); export THIS
else else
echo ERROR: must "cd where/dd4hep/is" before calling ". bin/thisdd4hep.sh" for this version of bash! echo ERROR: must "cd where/${package}/is" before calling ". bin/this${package}.sh" for this version of bash!
THIS=; export THIS THIS=; export THIS
return 1 return 1
fi fi
...@@ -69,7 +70,7 @@ if [ "x$SOURCE" = "x" ]; then ...@@ -69,7 +70,7 @@ if [ "x$SOURCE" = "x" ]; then
SOURCE=${(%):-%N} # for zsh SOURCE=${(%):-%N} # for zsh
fi fi
dd4hep_parse_this $SOURCE; dd4hep_parse_this $SOURCE @PackageName@;
# #
# These 3 are the main configuration variables: ROOT, Geant4 and XercesC # These 3 are the main configuration variables: ROOT, Geant4 and XercesC
# --> LCIO & Co. are handled elsewhere! # --> LCIO & Co. are handled elsewhere!
......
...@@ -21,7 +21,7 @@ if [ "x$SOURCE" = "x" ]; then ...@@ -21,7 +21,7 @@ if [ "x$SOURCE" = "x" ]; then
SOURCE=${(%):-%N} # for zsh SOURCE=${(%):-%N} # for zsh
fi fi
dd4hep_parse_this $SOURCE; dd4hep_parse_this $SOURCE @PackageName@;
# #
#----PATH--------------------------------------------------------------------- #----PATH---------------------------------------------------------------------
dd4hep_add_path PATH ${THIS}/bin; dd4hep_add_path PATH ${THIS}/bin;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment