Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
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
Development
openfoam
Commits
88477b66
"README.md" did not exist on "3f2d0519ebfaacbc56bb3d408bd63e6e15daa476"
Commit
88477b66
authored
2 years ago
by
Mark OLESEN
Browse files
Options
Downloads
Patches
Plain Diff
CONFIG: handle string splitting [zsh] (
#2640
)
parent
aaf921ba
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
wmake/scripts/sysFunctions
+34
-6
34 additions, 6 deletions
wmake/scripts/sysFunctions
with
34 additions
and
6 deletions
wmake/scripts/sysFunctions
+
34
−
6
View file @
88477b66
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# \\ / A nd | www.openfoam.com
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
# \\/ M anipulation |
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Copyright (C) 2018-202
0
OpenCFD Ltd.
# Copyright (C) 2018-202
2
OpenCFD Ltd.
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# License
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
...
@@ -212,7 +212,7 @@ then
...
@@ -212,7 +212,7 @@ then
findLibrary
()
findLibrary
()
{
{
local
prefixDir localDir searchDir searchName
local
prefixDir localDir searchDir searchName
local
file
ex
t
local
file
found ext zshspli
t
searchDir
=
true
searchDir
=
true
...
@@ -264,6 +264,13 @@ then
...
@@ -264,6 +264,13 @@ then
## echo "search: $# $@" 1>&2
## echo "search: $# $@" 1>&2
# Split extLibraries on space, but zsh does not like that
if
[
-n
"
$ZSH_VERSION
"
]
then
case
"
$-
"
in
(
*
y
*
)
zshsplit
=
y
;;
esac
setopt shwordsplit
fi
for
searchDir
in
"
$@
"
for
searchDir
in
"
$@
"
do
do
[
-n
"
$searchDir
"
]
||
continue
[
-n
"
$searchDir
"
]
||
continue
...
@@ -272,8 +279,8 @@ then
...
@@ -272,8 +279,8 @@ then
file
=
"
$prefixDir
/
$searchDir
/
$searchName$ext
"
file
=
"
$prefixDir
/
$searchDir
/
$searchName$ext
"
if
[
-f
"
$file
"
]
&&
[
-r
"
$file
"
]
if
[
-f
"
$file
"
]
&&
[
-r
"
$file
"
]
then
then
echo
"
$file
"
# Found
found
=
"
$file
"
# Found
re
turn
0
b
re
ak
2
fi
fi
done
done
done
done
...
@@ -281,6 +288,13 @@ then
...
@@ -281,6 +288,13 @@ then
else
else
# Directed search
# Directed search
# Split extLibraries on space, but zsh does not like that
if
[
-n
"
$ZSH_VERSION
"
]
then
case
"
$-
"
in
(
*
y
*
)
zshsplit
=
y
;;
esac
setopt shwordsplit
fi
for
file
for
file
do
do
[
-n
"
$file
"
]
||
continue
[
-n
"
$file
"
]
||
continue
...
@@ -288,13 +302,27 @@ then
...
@@ -288,13 +302,27 @@ then
do
do
if
[
-f
"
$file$ext
"
]
&&
[
-r
"
$file$ext
"
]
if
[
-f
"
$file$ext
"
]
&&
[
-r
"
$file$ext
"
]
then
then
echo
"
$file$ext
"
# Found
found
=
"
$file$ext
"
# Found
re
turn
0
b
re
ak
2
fi
fi
done
done
done
done
fi
fi
# Restore word splitting (zsh)
# Restore case "$-" in (*y*) zshsplit=y;; esac
if
[
-n
"
$ZSH_VERSION
"
]
&&
[
-z
"
$zshsplit
"
]
then
unsetopt shwordsplit
fi
if
[
-n
"
$found
"
]
then
echo
"
$found
"
return
0
fi
return
2
return
2
}
}
...
...
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