Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
a2c609c5
Commit
a2c609c5
authored
Nov 24, 2017
by
Jens Korinth
Browse files
Fix setup.sh bug on systems with no realpath program
parent
9752d87c
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.sh
View file @
a2c609c5
if
[
-n
"
$BASH_VERSION
"
]
;
then
command
-v
xargs
>
/dev/null
||
{
echo
>
&2
"ERROR: xargs program not available."
;
}
if
[
"
`
uname
`
"
=
"Darwin"
]
;
then
export
TAPASCO_HOME
=
`
dirname
${
BASH_SOURCE
[0]
}
| xargs
cd
|
pwd
`
else
export
TAPASCO_HOME
=
`
dirname
${
BASH_SOURCE
[0]
}
| xargs
realpath
`
command
-v
realpath
>
/dev/null
||
command
-v
readlink
>
/dev/null
||
{
echo
"ERROR: neither realpath nor readlink programs are available."
;
}
command
-v
xargs
>
/dev/null
&&
command
-v
realpath
>
/dev/null
&&
export
TAPASCO_HOME
=
`
dirname
${
BASH_SOURCE
[0]
}
| xargs
realpath
`
command
-v
xargs
>
/dev/null
&&
command
-v
readlink
>
/dev/null
&&
export
TAPASCO_HOME
=
`
dirname
${
BASH_SOURCE
[0]
}
| xargs
readlink
-f
`
fi
elif
[
-n
"
$ZSH_VERSION
"
]
;
then
export
TAPASCO_HOME
=
`
dirname
${
(%)
:-
%x
}
| xargs
realpath
`
command
-v
realpath
>
/dev/null
||
command
-v
readlink
>
/dev/null
||
{
echo
"ERROR: neither realpath nor readlink programs are available."
;
}
command
-v
xargs
>
/dev/null
&&
command
-v
realpath
>
/dev/null
&&
export
TAPASCO_HOME
=
`
dirname
${
(%)
:-
%x
}
| xargs
realpath
`
command
-v
xargs
>
/dev/null
&&
command
-v
readlink
>
/dev/null
&&
export
TAPASCO_HOME
=
`
dirname
${
(%)
:-
%x
}
| xargs
readlink
-f
`
else
echo
"WARNING: unknown shell; need source setup.sh from the TaPaSCo root dir!"
echo
"WARNING: unknown shell; need
to
source setup.sh from the TaPaSCo root dir!"
export
TAPASCO_HOME
=
$PWD
fi
echo
"TAPASCO_HOME=
$TAPASCO_HOME
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment