Skip to content
Snippets Groups Projects
Commit f2d9959b authored by Henry Weller's avatar Henry Weller
Browse files

foamConfigurePaths: Updated foamInstall option

parent 2b71ea6f
Branches
Tags
No related merge requests found
...@@ -79,10 +79,10 @@ _inlineSed() ...@@ -79,10 +79,10 @@ _inlineSed()
[ -f etc/bashrc ] || usage "Please run from top-level directory of installation" [ -f etc/bashrc ] || usage "Please run from top-level directory of installation"
unset foamInstall projectName projectVersion archOption unset foamInstDir projectName projectVersion archOption
unset paraviewInstall scotchArchPath unset paraviewInstall scotchArchPath
# parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in
...@@ -91,13 +91,18 @@ do ...@@ -91,13 +91,18 @@ do
;; ;;
-foamInstall | --foamInstall) -foamInstall | --foamInstall)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument" [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
foamInstall="$2" foamInstDir="$2"
# replace foamInstall=... # Replace FOAM_INST_DIR=...
_inlineSed \ _inlineSed \
etc/bashrc \ etc/bashrc \
'foamInstall=.*' \ '\(.*BASH_SOURCE.*\)' \
'foamInstall='"$foamInstall" \ '#\1' \
"Replacing foamInstall setting by '$foamInstall'" "Removing default FOAM_INST_DIR setting"
_inlineSed \
etc/bashrc \
'^export FOAM_INST_DIR=.*' \
'export FOAM_INST_DIR='"$foamInstDir" \
"Setting FOAM_INST_DIR to '$foamInstDir'"
shift 2 shift 2
;; ;;
-projectName | --projectName) -projectName | --projectName)
...@@ -189,7 +194,7 @@ do ...@@ -189,7 +194,7 @@ do
esac esac
done done
[ -n "$foamInstall" -o -n "$projectName" -o -n "$projectVersion" -o -n "$archOption" \ [ -n "$foamInstDir" -o -n "$projectName" -o -n "$projectVersion" -o -n "$archOption" \
-o -n "$paraviewInstall" -o -n "$paraviewVersion" \ -o -n "$paraviewInstall" -o -n "$paraviewVersion" \
-o -n "$scotchVersion" -o -n "$scotchArchPath" \ -o -n "$scotchVersion" -o -n "$scotchArchPath" \
] || usage "Please specify at least one configure option" ] || usage "Please specify at least one configure option"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment