@scottymade/mana 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mana +8 -2
- package/package.json +1 -1
package/bin/mana
CHANGED
|
@@ -9,8 +9,14 @@
|
|
|
9
9
|
|
|
10
10
|
set -e
|
|
11
11
|
|
|
12
|
-
# Get the directory where this script is located
|
|
13
|
-
|
|
12
|
+
# Get the directory where this script is located (resolving symlinks)
|
|
13
|
+
SOURCE="$0"
|
|
14
|
+
while [ -L "$SOURCE" ]; do
|
|
15
|
+
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
|
|
16
|
+
SOURCE="$(readlink "$SOURCE")"
|
|
17
|
+
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
|
18
|
+
done
|
|
19
|
+
SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
|
|
14
20
|
|
|
15
21
|
# Try to find the binary
|
|
16
22
|
# First, check for the symlink/copy created by postinstall
|