Skip to content
Snippets Groups Projects
Commit 38c56c5c authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: command-args overload ignored for etc/config.csh/paraview

- now needs local 'set' instead of 'setenv'

- fixed inconsistency in edit of ParaView_VERSION for csh version
parent 69006ef0
Branches
Tags
No related merge requests found
...@@ -123,7 +123,7 @@ _matches() ...@@ -123,7 +123,7 @@ _matches()
local result local result
for regexp for regexp
do do
result=$(echo "$input" | sed -n -e "/^$regexp"'$/p') result=$(echo "$input" | sed -ne "/^$regexp"'$/p')
test -n "$result" && return 0 # successful match test -n "$result" && return 0 # successful match
done done
return 1 return 1
...@@ -243,7 +243,7 @@ removeBashMagic() ...@@ -243,7 +243,7 @@ removeBashMagic()
# ---- # ----
# set projectName="$WM_PROJECT" # set projectName="$WM_PROJECT"
# set projectDir=`lsof +p $$ |& \ # set projectDir=`lsof +p $$ |& \
# sed -n -e 's@^[^/]*@@; s@\(/'"$projectName"'[^/]*\)/etc/cshrc[^/]*@\1@p'` # sed -ne 'something /etc/cshrc something'`
# ---- # ----
removeCshMagic() removeCshMagic()
{ {
...@@ -586,8 +586,8 @@ do ...@@ -586,8 +586,8 @@ do
_matches "$optionValue" "$expected" || \ _matches "$optionValue" "$expected" || \
die "'$1' has bad value: '$optionValue'" die "'$1' has bad value: '$optionValue'"
replace etc/config.sh/paraview ParaView_VERSION "$optionValue" replace etc/config.sh/paraview ParaView_VERSION "$optionValue"
replaceCsh etc/config.csh/paraview ParaView_VERSION "$optionValue" replace etc/config.csh/paraview ParaView_VERSION "$optionValue"
adjusted=true adjusted=true
shift shift
;; ;;
......
...@@ -77,15 +77,14 @@ endif ...@@ -77,15 +77,14 @@ endif
while ( $#argv > 0 ) while ( $#argv > 0 )
switch ($argv[1]) switch ($argv[1])
case ParaView*=*: case ParaView*=*:
# name=value -> setenv name value # name=value -> set name=value
eval "setenv $argv[1]:s/=/ /" eval "set $argv[1]"
breaksw breaksw
endsw endsw
shift shift
end end
if (! $?ParaView_VERSION ) set ParaView_VERSION='' if ($?ParaView_VERSION) then
switch ("$ParaView_VERSION") switch ("$ParaView_VERSION")
case "": case "":
# empty - do nothing # empty - do nothing
...@@ -209,8 +208,8 @@ default: ...@@ -209,8 +208,8 @@ default:
setenv ParaView_DIR # Defined but empty (used by foamPV alias) setenv ParaView_DIR # Defined but empty (used by foamPV alias)
endif endif
breaksw breaksw
endsw endsw
endif
unset cleaned archDir unset cleaned archDir
unset cmake cmake_version unset cmake cmake_version
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment