fix symlink

This commit is contained in:
Chris Tate
2026-01-11 03:35:33 -06:00
parent 33b7c2bfdb
commit b2c54d3eea
+13 -2
View File
@@ -2,8 +2,19 @@
# Cross-platform launcher for agent-browser
# Detects OS/arch and runs the appropriate native binary
# Get the directory where this script lives
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Get the directory where this script lives (resolving symlinks)
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
OS="$(uname -s)"