summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/qtcreator.sh11
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"`