fix symlink
This commit is contained in:
+13
-2
@@ -2,8 +2,19 @@
|
|||||||
# Cross-platform launcher for agent-browser
|
# Cross-platform launcher for agent-browser
|
||||||
# Detects OS/arch and runs the appropriate native binary
|
# Detects OS/arch and runs the appropriate native binary
|
||||||
|
|
||||||
# Get the directory where this script lives
|
# Get the directory where this script lives (resolving symlinks)
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT="$0"
|
||||||
|
# Resolve symlinks
|
||||||
|
while [ -L "$SCRIPT" ]; do
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
||||||
|
SCRIPT="$(readlink "$SCRIPT")"
|
||||||
|
# Handle relative symlinks
|
||||||
|
case "$SCRIPT" in
|
||||||
|
/*) ;;
|
||||||
|
*) SCRIPT="$SCRIPT_DIR/$SCRIPT" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
||||||
|
|
||||||
# Detect platform
|
# Detect platform
|
||||||
OS="$(uname -s)"
|
OS="$(uname -s)"
|
||||||
|
|||||||
Reference in New Issue
Block a user