Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

refactor(install): replace usage() magic line numbers with sentinels (#506)

JZe481116cc5d6
diff --git a/scripts/install.sh b/scripts/install.sh
index cb41ef5f..a705b701 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
#
+# --- USAGE-START --- (sentinel for usage(); do not remove)
# install.sh -- Install The Agency agents into your local agentic tool(s).
#
# Reads converted files from integrations/ and copies them to the appropriate
@@ -31,6 +32,7 @@
# --jobs N Max parallel jobs when using --parallel (default: nproc or 4)
# --help Show this help
#
+# --- USAGE-END --- (sentinel for usage(); do not remove)
# Platform support:
# Linux, macOS (requires bash 3.2+), Windows Git Bash / WSL
@@ -114,7 +116,12 @@ AGENT_DIRS=(
# Usage
# ---------------------------------------------------------------------------
usage() {
- sed -n '3,32p' "$0" | sed 's/^# \{0,1\}//'
+ # Extract everything between the USAGE-START / USAGE-END sentinels
+ # (excluding the sentinel lines themselves) and strip the leading "# ".
+ # Using sentinels instead of hard-coded line numbers means adding lines
+ # to the header comment block won't silently break --help output.
+ sed -n '/^# --- USAGE-START ---/,/^# --- USAGE-END ---/p' "$0" \
+ | sed -e '1d;$d' -e 's/^# \{0,1\}//'
exit 0
}