We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f0d26d commit 05c6b92Copy full SHA for 05c6b92
packaging/transrate
@@ -2,7 +2,22 @@
2
set -e
3
4
# Figure out where this script is located.
5
-SELFSCRIPT="`readlink -f \"$0\"`"
+THIS_FILE=$0
6
+
7
+cd `dirname $THIS_FILE`
8
+THIS_FILE=`basename $THIS_FILE`
9
10
+# Iterate down a (possible) chain of symlinks
11
+# Compute the canonicalized name by finding the physical path
12
+# for the directory we're in and appending the target file.
13
+while [ -L "$THIS_FILE" ]
14
+do
15
+ THIS_FILE=`readlink $THIS_FILE`
16
+ cd `dirname $THIS_FILE`
17
+ THIS_FILE=`basename $THIS_FILE`
18
+done
19
20
+SELFSCRIPT=$PHYS_DIR/$THIS_FILE
21
SELFDIR="`dirname \"$SELFSCRIPT\"`"
22
SELFDIR="`cd \"$SELFDIR\" && pwd`"
23
0 commit comments