Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix: resolve symlinks in install.sh for npm/bun bin usage

Affaan Mustafad9d0d3c444c8
diff --git a/install.sh b/install.sh
index f7d9c89b9..6c868b203 100755
--- a/install.sh
+++ b/install.sh
@@ -22,7 +22,15 @@
set -euo pipefail
-SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+# Resolve symlinks — needed when invoked as `ecc-install` via npm/bun bin symlink
+SCRIPT_PATH="$0"
+while [ -L "$SCRIPT_PATH" ]; do
+ link_dir="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
+ SCRIPT_PATH="$(readlink "$SCRIPT_PATH")"
+ # Resolve relative symlinks
+ [[ "$SCRIPT_PATH" != /* ]] && SCRIPT_PATH="$link_dir/$SCRIPT_PATH"
+done
+SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
RULES_DIR="$SCRIPT_DIR/rules"
# --- Parse --target flag ---