diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-09-27 13:28:45 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-09-27 13:06:53 +0000 |
commit | 3ff007d573b6b72d4f6d1802e76e643a4dde0d3a (patch) | |
tree | e7201882b5774472f26cd04d7098fe8f25557e4a /bin | |
parent | 5654828b228407c5e3f1a999f0884daf1b69725c (diff) | |
download | qt-creator-3ff007d573b6b72d4f6d1802e76e643a4dde0d3a.tar.gz |
don't detect readlink a-priori
it's pointless and causes an unnecessary delay.
what's worse, we wouldn't actually know whether we found a compatible
(gnu) readlink, so the fallback would never get activated. this would be
the case on macos (the problem wasn't noticed so far, because on macos
we build a bundle which doesn't need the wrapper in the first place).
Change-Id: Ibf4c370d5d9e25064e80faeaf12eb5fa1bc68c20
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/qtcreator.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/qtcreator.sh b/bin/qtcreator.sh index 794882ec8c..80fc4499c9 100755 --- a/bin/qtcreator.sh +++ b/bin/qtcreator.sh @@ -19,13 +19,12 @@ makeAbsolute() { me=`which "$0"` # Search $PATH if necessary if test -L "$me"; then - # Try readlink(1) - readlink=`type readlink 2>/dev/null` || readlink= - if test -n "$readlink"; then - # We have readlink(1), so we can use it. Assuming GNU readlink (for -f). - me=`readlink -nf "$me"` + # Try GNU readlink(1) + nme=`readlink -nf "$me" 2>/dev/null` + if test -n "$nme"; then + me=$nme else - # No readlink(1), so let's try ls -l + # No GNU readlink(1), so let's try ls -l base=`dirname "$me"` me=`ls -l "$me" | sed 's/^.*-> //'` me=`makeAbsolute "$me" "$base"` |