Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Core Modules
dune-common
Commits
17028220
Commit
17028220
authored
18 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
fixed canonicalpath, first try readlink, if it's a file use the real name
[[Imported from SVN: r4715]]
parent
879ed810
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/dunecontrol
+13
-17
13 additions, 17 deletions
bin/dunecontrol
bin/duneproject
+12
-15
12 additions, 15 deletions
bin/duneproject
bin/mpi-config
+12
-17
12 additions, 17 deletions
bin/mpi-config
with
37 additions
and
49 deletions
bin/dunecontrol
+
13
−
17
View file @
17028220
...
...
@@ -2,23 +2,20 @@
set
-e
# Get the canonical path (without using readlink)
# Does not work for weired file names
canonicalizepath
(){
canonicalname
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonical
izepath path
echo
Usage: canonical
name path
>
/dev/stderr
return
1
fi
local
searchpath
=
"
$PATH
:.:
$(
dirname
$0
)
"
local
prog
=
$(
echo
$0
|
sed
's/.*\/\([-_a-zA-Z0-9]*\)$/\1/'
)
for
i
in
`
echo
$searchpath
|
sed
-e
's/:/ /g'
`
;
do
if
test
-e
"
$i
/
$prog
"
;
then
canonicalpath
=
"
$i
"
return
0
fi
done
echo
"Error: no canonical path found"
exit
1
readlink
$1
||
echo
"
$(
dirname
$1
)
/
$(
basename
$1
)
"
}
canonicalpath
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalpath path
>
/dev/stderr
return
1
fi
(
cd
$(
dirname
$(
canonicalname
$1
))
&&
pwd
)
}
if
test
"x
$1
"
=
"x--debug"
;
then
...
...
@@ -32,8 +29,7 @@ fi
# Read the modules find part
canonicalizepath
$0
.
$canonicalpath
/dunemodules.inc
.
$(
canonicalpath
$0
)
/dunemodules.inc
###
...
...
@@ -251,7 +247,7 @@ while test $# -gt 0; do
echo
exit
1
;
fi
OPTS_FILE
=
$(
c
d
$(
dirname
$(
readlink
-f
$arg
))
;
pwd
)
/
$(
basename
$arg
)
OPTS_FILE
=
$(
c
anonicalpath
$arg
)
/
$(
basename
$arg
)
if
!
test
-r
"
$OPTS_FILE
"
;
then
usage
echo
"ERROR: could not read opts file
\"
$OPTS_FILE
\"
"
...
...
This diff is collapsed.
Click to expand it.
bin/duneproject
+
12
−
15
View file @
17028220
...
...
@@ -9,22 +9,20 @@
set
-e
# Get the canonical path (without using readlink)
canonicalizepath
(){
canonicalname
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonical
izepath path
echo
Usage: canonical
name path
>
/dev/stderr
return
1
fi
local
searchpath
=
"
$PATH
:.:
$(
dirname
$0
)
"
local
prog
=
$(
echo
$0
|
sed
's/.*\/\([-_a-zA-Z0-9]*\)$/\1/'
)
for
i
in
`
echo
$searchpath
|
sed
-e
's/:/ /g'
`
;
do
if
test
-e
"
$i
/
$prog
"
;
then
canonicalpath
=
"
$i
"
return
fi
done
echo
"Error: no canonical path found"
exit
1
readlink
$1
||
echo
"
$(
dirname
$1
)
/
$(
basename
$1
)
"
}
canonicalpath
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalpath path
>
/dev/stderr
return
1
fi
(
cd
$(
dirname
$(
canonicalname
$1
))
&&
pwd
)
}
echo
Dune project/module generator
...
...
@@ -42,8 +40,7 @@ while [ "$DATACORRECT" != "y" -a "$DATACORRECT" != "Y" ]; do
MODULE
=
"
$PROJECT
"
# Read the modules find part
canonicalizepath
$0
.
$(
cd
$canonicalpath
;
pwd
)
/dunemodules.inc
.
$(
canonicalpath
$0
)
/dunemodules.inc
if
[
"
$MODULES
"
=
""
]
;
then
find_modules
.
...
...
This diff is collapsed.
Click to expand it.
bin/mpi-config
+
12
−
17
View file @
17028220
...
...
@@ -2,22 +2,20 @@
set
-e
# Get the canonical path (without using readlink)
canonicalizepath
(){
canonicalname
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonical
izepath path
echo
Usage: canonical
name path
>
/dev/stderr
return
1
fi
local
searchpath
=
"
$PATH
:.:
$(
dirname
$0
)
"
local
prog
=
$(
echo
$0
|
sed
's/.*\/\([-_a-zA-Z0-9]*\)$/\1/'
)
for
i
in
`
echo
$searchpath
|
sed
-e
's/:/ /g'
`
;
do
if
test
-e
"
$i
/
$prog
"
;
then
canonicalpath
=
"
$i
"
return
0
fi
done
echo
"Error: no canonical path found"
exit
1
readlink
$1
||
echo
"
$(
dirname
$1
)
/
$(
basename
$1
)
"
}
canonicalpath
(){
if
test
$#
-ne
1
;
then
echo
Usage: canonicalpath path
>
/dev/stderr
return
1
fi
(
cd
$(
dirname
$(
canonicalname
$1
))
&&
pwd
)
}
version
=
0.1
...
...
@@ -90,11 +88,8 @@ fi
# load mpi-config.m4
#
# Read the modules find part
canonicalizepath
$0
eval
"
$(
m4
-I
$canonicalpath
/../m4/
<<
EOF
m4
-I
$
(
canonicalpath
$0
/../m4/
)
<<
EOF
changequote([, ])
define([AC_DEFUN],[define([
\$
1],[
\$
2])])
define([AC_MSG_CHECKING],[
...
...
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