fix symlink
This commit is contained in:
+13
-2
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user