MDL-32323 more magic to allow init.sh symlinks

from http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
This commit is contained in:
Petr Skoda
2012-04-10 15:27:02 +02:00
parent 3c4c51891c
commit 5987e6932c
+4 -1
View File
@@ -1,6 +1,9 @@
#!/bin/bash
CLIDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
CLIDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
UTIL="$CLIDIR/util.php"
echo "Initialising test database and creating phpunit.xml configuration..."