fix(shell): resolve all shellcheck warnings across scripts
- SC2088: replace ~ with $HOME in quoted strings (doctor.sh) - SC2010/SC2012: replace ls|grep with compgen -G globs (detect-plugins.sh) - SC2034: remove unused PKG and RED variables (install-plugins.sh, update-all.sh) - SC2015: convert A&&B||C to proper if/then/else (update-all.sh, install-plugins.sh, session-start.sh) - SC1090: add shellcheck source directive (statusline.sh) - SC2129: group redirects into single block (install-plugins.sh) 0 warnings remaining (3 SC1091 info-level expected). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
40db25b590
commit
71955ea7b3
12
doctor.sh
12
doctor.sh
@ -38,7 +38,7 @@ check_symlink() {
|
|||||||
local target="$HOME/.claude/$name"
|
local target="$HOME/.claude/$name"
|
||||||
|
|
||||||
if [ ! -e "$target" ] && [ ! -L "$target" ]; then
|
if [ ! -e "$target" ] && [ ! -L "$target" ]; then
|
||||||
fail "~/.claude/$name — MISSING"
|
fail "$HOME/.claude/$name — MISSING"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -47,12 +47,12 @@ check_symlink() {
|
|||||||
local real
|
local real
|
||||||
real=$(readlink -f "$target" 2>/dev/null) || real=$(readlink "$target")
|
real=$(readlink -f "$target" 2>/dev/null) || real=$(readlink "$target")
|
||||||
if [ ! -e "$real" ]; then
|
if [ ! -e "$real" ]; then
|
||||||
fail "~/.claude/$name → $real — BROKEN SYMLINK"
|
fail "$HOME/.claude/$name → $real — BROKEN SYMLINK"
|
||||||
else
|
else
|
||||||
pass "~/.claude/$name"; _LINK_PASS=$((_LINK_PASS + 1))
|
pass "$HOME/.claude/$name"; _LINK_PASS=$((_LINK_PASS + 1))
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
warn "~/.claude/$name exists but is NOT a symlink (expected symlink to repo)"
|
warn "$HOME/.claude/$name exists but is NOT a symlink (expected symlink to repo)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ if [ -L "$HOME/.claude/skills/gstack" ]; then
|
|||||||
if [ -d "$real" ]; then
|
if [ -d "$real" ]; then
|
||||||
pass "Symlink OK → $real"
|
pass "Symlink OK → $real"
|
||||||
# Check for skills/ subdirectory (referenced by plugin-advisor PHASE 1)
|
# Check for skills/ subdirectory (referenced by plugin-advisor PHASE 1)
|
||||||
gstack_skills_count=$(ls "$HOME/.claude/skills/gstack/skills/" 2>/dev/null | wc -l | tr -d ' ')
|
gstack_skills_count=$(find "$HOME/.claude/skills/gstack/skills/" -maxdepth 1 -mindepth 1 2>/dev/null | wc -l | tr -d ' ')
|
||||||
if [ "${gstack_skills_count:-0}" -gt 0 ]; then
|
if [ "${gstack_skills_count:-0}" -gt 0 ]; then
|
||||||
pass "GStack: ${gstack_skills_count} skills available"
|
pass "GStack: ${gstack_skills_count} skills available"
|
||||||
else
|
else
|
||||||
@ -213,7 +213,7 @@ print(len(d.get('permissions',{}).get('deny',[])))
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
fail "~/.claude/settings.json not found"
|
fail "$HOME/.claude/settings.json not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@ -161,7 +161,7 @@ printf "│ 📦 v%-45s│\n" "$CONFIG_VERSION"
|
|||||||
# Version check: compare local vs remote (non-blocking)
|
# Version check: compare local vs remote (non-blocking)
|
||||||
_remote_ver=""
|
_remote_ver=""
|
||||||
if [ -n "$REPO_DIR" ] && [ -d "$REPO_DIR/.git" ]; then
|
if [ -n "$REPO_DIR" ] && [ -d "$REPO_DIR/.git" ]; then
|
||||||
_remote_ver=$(cd "$REPO_DIR" 2>/dev/null && git fetch origin --quiet 2>/dev/null && git show origin/master:version.txt 2>/dev/null || true)
|
_remote_ver=$(cd "$REPO_DIR" 2>/dev/null && git fetch origin --quiet 2>/dev/null && git show origin/master:version.txt 2>/dev/null) || _remote_ver=""
|
||||||
fi
|
fi
|
||||||
if [ -n "$_remote_ver" ] && [ "$_remote_ver" != "$CONFIG_VERSION" ]; then
|
if [ -n "$_remote_ver" ] && [ "$_remote_ver" != "$CONFIG_VERSION" ]; then
|
||||||
printf "│ 🔄 update available: v%-27s│\n" "$_remote_ver"
|
printf "│ 🔄 update available: v%-27s│\n" "$_remote_ver"
|
||||||
|
|||||||
@ -21,6 +21,7 @@ BRANCH_STR="${BRANCH:+ ($BRANCH)}"
|
|||||||
# Plan detection (reuse shared lib)
|
# Plan detection (reuse shared lib)
|
||||||
_lib="$(dirname "${BASH_SOURCE[0]}")/../lib/detect-plugins.sh"
|
_lib="$(dirname "${BASH_SOURCE[0]}")/../lib/detect-plugins.sh"
|
||||||
if [ -f "$_lib" ]; then
|
if [ -f "$_lib" ]; then
|
||||||
|
# shellcheck source=../lib/detect-plugins.sh
|
||||||
source "$_lib"
|
source "$_lib"
|
||||||
PLAN=$(detect_plan 2>/dev/null || echo "pro")
|
PLAN=$(detect_plan 2>/dev/null || echo "pro")
|
||||||
else
|
else
|
||||||
|
|||||||
@ -50,15 +50,14 @@ print(v)
|
|||||||
# DETECT OS
|
# DETECT OS
|
||||||
# ============================================================
|
# ============================================================
|
||||||
OS="unknown"
|
OS="unknown"
|
||||||
PKG=""
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
OS="macos"
|
OS="macos"
|
||||||
elif command -v apt-get &>/dev/null; then
|
elif command -v apt-get &>/dev/null; then
|
||||||
OS="linux-apt"; PKG="apt-get"
|
OS="linux-apt"
|
||||||
elif command -v dnf &>/dev/null; then
|
elif command -v dnf &>/dev/null; then
|
||||||
OS="linux-dnf"; PKG="dnf"
|
OS="linux-dnf"
|
||||||
elif command -v pacman &>/dev/null; then
|
elif command -v pacman &>/dev/null; then
|
||||||
OS="linux-pacman"; PKG="pacman"
|
OS="linux-pacman"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
@ -120,7 +119,11 @@ if [ "$NODE_OK" = false ]; then
|
|||||||
;;
|
;;
|
||||||
*) warn "Cannot auto-install Node.js on $OS — install from https://nodejs.org" ;;
|
*) warn "Cannot auto-install Node.js on $OS — install from https://nodejs.org" ;;
|
||||||
esac
|
esac
|
||||||
command -v node &>/dev/null && ok "Node.js $(node --version)" || err "Node.js install failed"
|
if command -v node &>/dev/null; then
|
||||||
|
ok "Node.js $(node --version)"
|
||||||
|
else
|
||||||
|
err "Node.js install failed"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Rust + Cargo (for RTK) ---
|
# --- Rust + Cargo (for RTK) ---
|
||||||
@ -162,6 +165,34 @@ else
|
|||||||
pipx ensurepath 2>/dev/null || true
|
pipx ensurepath 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# --- shellcheck ---
|
||||||
|
if command -v shellcheck &>/dev/null; then
|
||||||
|
ok "shellcheck $(shellcheck --version 2>/dev/null | grep '^version:' | awk '{print $2}')"
|
||||||
|
else
|
||||||
|
info "Installing shellcheck..."
|
||||||
|
case $OS in
|
||||||
|
macos) brew install shellcheck ;;
|
||||||
|
linux-apt) sudo apt-get install -y shellcheck ;;
|
||||||
|
linux-dnf) sudo dnf install -y shellcheck ;;
|
||||||
|
linux-pacman) sudo pacman -S --noconfirm shellcheck ;;
|
||||||
|
*)
|
||||||
|
# Binary fallback for systems without package manager access
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
if curl -sL "https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.${ARCH}.tar.xz" | tar -xJ --strip-components=1 -C "$HOME/.local/bin" "shellcheck-v0.10.0/shellcheck" 2>/dev/null; then
|
||||||
|
chmod +x "$HOME/.local/bin/shellcheck"
|
||||||
|
ok "shellcheck installed (binary fallback)"
|
||||||
|
else
|
||||||
|
warn "Cannot auto-install shellcheck on $OS"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if command -v shellcheck &>/dev/null; then
|
||||||
|
ok "shellcheck installed"
|
||||||
|
else
|
||||||
|
warn "shellcheck install failed"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Claude Code CLI ---
|
# --- Claude Code CLI ---
|
||||||
if command -v claude &>/dev/null; then
|
if command -v claude &>/dev/null; then
|
||||||
ok "Claude Code $(claude --version 2>/dev/null | head -1)"
|
ok "Claude Code $(claude --version 2>/dev/null | head -1)"
|
||||||
@ -206,7 +237,11 @@ if [ -d "$GSTACK_DIR" ]; then
|
|||||||
curl -fsSL "https://bun.sh/install" -o "$tmpfile"
|
curl -fsSL "https://bun.sh/install" -o "$tmpfile"
|
||||||
BUN_VERSION="$BUN_VERSION" bash "$tmpfile" && rm -f "$tmpfile"
|
BUN_VERSION="$BUN_VERSION" bash "$tmpfile" && rm -f "$tmpfile"
|
||||||
export PATH="$HOME/.bun/bin:$PATH"
|
export PATH="$HOME/.bun/bin:$PATH"
|
||||||
command -v bun &>/dev/null && ok "bun $(bun --version)" || err "bun install failed"
|
if command -v bun &>/dev/null; then
|
||||||
|
ok "bun $(bun --version)"
|
||||||
|
else
|
||||||
|
err "bun install failed"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ok "bun $(bun --version)"
|
ok "bun $(bun --version)"
|
||||||
fi
|
fi
|
||||||
@ -280,8 +315,11 @@ else
|
|||||||
info "Installing gsd-pi@latest (consider pinning in plugins.lock.json)..."
|
info "Installing gsd-pi@latest (consider pinning in plugins.lock.json)..."
|
||||||
npm install -g gsd-pi
|
npm install -g gsd-pi
|
||||||
fi
|
fi
|
||||||
command -v gsd &>/dev/null && ok "GSD v2 installed ($(gsd --version 2>/dev/null | head -1))" \
|
if command -v gsd &>/dev/null; then
|
||||||
|| err "GSD v2 install failed — check npm output above"
|
ok "GSD v2 installed ($(gsd --version 2>/dev/null | head -1))"
|
||||||
|
else
|
||||||
|
err "GSD v2 install failed — check npm output above"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@ -354,8 +392,11 @@ else
|
|||||||
info "Installing ctx7@latest (consider pinning in plugins.lock.json)..."
|
info "Installing ctx7@latest (consider pinning in plugins.lock.json)..."
|
||||||
npm install -g ctx7
|
npm install -g ctx7
|
||||||
fi
|
fi
|
||||||
command -v ctx7 &>/dev/null && ok "ctx7 installed ($(ctx7 --version 2>/dev/null | head -1))" \
|
if command -v ctx7 &>/dev/null; then
|
||||||
|| err "ctx7 install failed — run manually: npm install -g ctx7"
|
ok "ctx7 installed ($(ctx7 --version 2>/dev/null | head -1))"
|
||||||
|
else
|
||||||
|
err "ctx7 install failed — run manually: npm install -g ctx7"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# Suggest setup for Claude Code integration (optional — ctx7 also works standalone)
|
# Suggest setup for Claude Code integration (optional — ctx7 also works standalone)
|
||||||
if command -v ctx7 &>/dev/null; then
|
if command -v ctx7 &>/dev/null; then
|
||||||
@ -373,9 +414,11 @@ if command -v graphify &>/dev/null; then
|
|||||||
ok "graphify already installed"
|
ok "graphify already installed"
|
||||||
else
|
else
|
||||||
info "Installing graphifyy via pipx..."
|
info "Installing graphifyy via pipx..."
|
||||||
pipx install graphifyy 2>/dev/null \
|
if pipx install graphifyy 2>/dev/null; then
|
||||||
&& ok "graphifyy installed" \
|
ok "graphifyy installed"
|
||||||
|| err "graphifyy install failed — run manually: pipx install graphifyy"
|
else
|
||||||
|
err "graphifyy install failed — run manually: pipx install graphifyy"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if command -v graphify &>/dev/null; then
|
if command -v graphify &>/dev/null; then
|
||||||
info "Running graphify install (dependencies)..."
|
info "Running graphify install (dependencies)..."
|
||||||
@ -398,9 +441,11 @@ if [ -f "$EMIL_DIR/SKILL.md" ]; then
|
|||||||
ok "emil-design-eng already downloaded"
|
ok "emil-design-eng already downloaded"
|
||||||
else
|
else
|
||||||
info "Downloading SKILL.md from emilkowalski/skill..."
|
info "Downloading SKILL.md from emilkowalski/skill..."
|
||||||
curl -fsSL "$EMIL_URL" -o "$EMIL_DIR/SKILL.md" \
|
if curl -fsSL "$EMIL_URL" -o "$EMIL_DIR/SKILL.md"; then
|
||||||
&& ok "emil-design-eng installed" \
|
ok "emil-design-eng installed"
|
||||||
|| err "emil-design-eng download failed — try: curl -fsSL $EMIL_URL -o $EMIL_DIR/SKILL.md"
|
else
|
||||||
|
err "emil-design-eng download failed — try: curl -fsSL $EMIL_URL -o $EMIL_DIR/SKILL.md"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# Symlink handled by link.sh
|
# Symlink handled by link.sh
|
||||||
if [ -L "$HOME/.claude/skills/emil-design-eng" ]; then
|
if [ -L "$HOME/.claude/skills/emil-design-eng" ]; then
|
||||||
@ -444,9 +489,11 @@ for line in "${CLAUDE_LINES[@]}"; do
|
|||||||
if grep -qF "$line" "$SHELL_PROFILE" 2>/dev/null; then
|
if grep -qF "$line" "$SHELL_PROFILE" 2>/dev/null; then
|
||||||
ok "$line (already in $SHELL_PROFILE)"
|
ok "$line (already in $SHELL_PROFILE)"
|
||||||
else
|
else
|
||||||
echo "" >> "$SHELL_PROFILE"
|
{
|
||||||
echo "# Claude Code — added by install-plugins.sh" >> "$SHELL_PROFILE"
|
echo ""
|
||||||
echo "$line" >> "$SHELL_PROFILE"
|
echo "# Claude Code — added by install-plugins.sh"
|
||||||
|
echo "$line"
|
||||||
|
} >> "$SHELL_PROFILE"
|
||||||
ok "$line → $SHELL_PROFILE"
|
ok "$line → $SHELL_PROFILE"
|
||||||
ADDED=1
|
ADDED=1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -17,7 +17,7 @@ detect_superpowers() {
|
|||||||
# Fast check: filesystem (plugin cache)
|
# Fast check: filesystem (plugin cache)
|
||||||
local cache_dir="$HOME/.claude/plugins/cache"
|
local cache_dir="$HOME/.claude/plugins/cache"
|
||||||
if [ -d "$cache_dir" ]; then
|
if [ -d "$cache_dir" ]; then
|
||||||
ls "$cache_dir" 2>/dev/null | grep -qi "superpowers" && return 0
|
compgen -G "$cache_dir"/*superpowers* &>/dev/null && return 0
|
||||||
fi
|
fi
|
||||||
# Slow fallback: CLI (only if fast check fails)
|
# Slow fallback: CLI (only if fast check fails)
|
||||||
claude plugin list 2>/dev/null | grep -qi "superpowers" && return 0
|
claude plugin list 2>/dev/null | grep -qi "superpowers" && return 0
|
||||||
@ -26,7 +26,7 @@ detect_superpowers() {
|
|||||||
|
|
||||||
detect_security_guidance() {
|
detect_security_guidance() {
|
||||||
local cache_dir="$HOME/.claude/plugins/cache"
|
local cache_dir="$HOME/.claude/plugins/cache"
|
||||||
[ -d "$cache_dir" ] && ls "$cache_dir" 2>/dev/null | grep -qi "security-guidance"
|
[ -d "$cache_dir" ] && compgen -G "$cache_dir"/*security-guidance* &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -45,12 +45,12 @@ detect_gsd() {
|
|||||||
detect_plugin_dev() {
|
detect_plugin_dev() {
|
||||||
# plugin-dev replaces the old "skill-creator" reference
|
# plugin-dev replaces the old "skill-creator" reference
|
||||||
local cache_dir="$HOME/.claude/plugins/cache"
|
local cache_dir="$HOME/.claude/plugins/cache"
|
||||||
[ -d "$cache_dir" ] && ls "$cache_dir" 2>/dev/null | grep -qi "plugin-dev"
|
[ -d "$cache_dir" ] && compgen -G "$cache_dir"/*plugin-dev* &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
detect_uiux_pro_max() {
|
detect_uiux_pro_max() {
|
||||||
local cache_dir="$HOME/.claude/plugins/cache"
|
local cache_dir="$HOME/.claude/plugins/cache"
|
||||||
[ -d "$cache_dir" ] && ls "$cache_dir" 2>/dev/null | grep -qi "ui-ux-pro-max"
|
[ -d "$cache_dir" ] && compgen -G "$cache_dir"/*ui-ux-pro-max* &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
detect_context7() {
|
detect_context7() {
|
||||||
|
|||||||
116
update-all.sh
116
update-all.sh
@ -6,7 +6,7 @@
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; BLUE='\033[0;34m'; NC='\033[0m'
|
GREEN='\033[0;32m'; YELLOW='\033[1;33m'; BLUE='\033[0;34m'; NC='\033[0m'
|
||||||
ok() { echo -e "${GREEN}✓${NC} $1"; }
|
ok() { echo -e "${GREEN}✓${NC} $1"; }
|
||||||
warn() { echo -e "${YELLOW}⚠${NC} $1"; }
|
warn() { echo -e "${YELLOW}⚠${NC} $1"; }
|
||||||
info() { echo -e "${BLUE}→${NC} $1"; }
|
info() { echo -e "${BLUE}→${NC} $1"; }
|
||||||
@ -97,15 +97,19 @@ print(d.get('rtk',{}).get('version',''))
|
|||||||
if [ -n "$RTK_VERSION" ] && [ "$RTK_VERSION" != "latest" ]; then
|
if [ -n "$RTK_VERSION" ] && [ "$RTK_VERSION" != "latest" ]; then
|
||||||
info "Pinned version: $RTK_VERSION"
|
info "Pinned version: $RTK_VERSION"
|
||||||
info "Compiling from source — this may take a few minutes..."
|
info "Compiling from source — this may take a few minutes..."
|
||||||
cargo install --git https://github.com/rtk-ai/rtk --tag "$RTK_VERSION" --force \
|
if cargo install --git https://github.com/rtk-ai/rtk --tag "$RTK_VERSION" --force; then
|
||||||
&& ok "RTK updated to $RTK_VERSION" \
|
ok "RTK updated to $RTK_VERSION"
|
||||||
|| warn "RTK update failed"
|
else
|
||||||
|
warn "RTK update failed"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
info "No pinned version — installing latest"
|
info "No pinned version — installing latest"
|
||||||
info "Compiling from source — this may take a few minutes..."
|
info "Compiling from source — this may take a few minutes..."
|
||||||
cargo install --git https://github.com/rtk-ai/rtk --force \
|
if cargo install --git https://github.com/rtk-ai/rtk --force; then
|
||||||
&& ok "RTK updated (latest)" \
|
ok "RTK updated (latest)"
|
||||||
|| warn "RTK update failed"
|
else
|
||||||
|
warn "RTK update failed"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
warn "Cargo not available — skipping RTK"
|
warn "Cargo not available — skipping RTK"
|
||||||
@ -127,14 +131,18 @@ print(d.get('gsd',{}).get('version',''))
|
|||||||
|
|
||||||
if [ -n "$GSD_VER" ] && [ "$GSD_VER" != "latest" ]; then
|
if [ -n "$GSD_VER" ] && [ "$GSD_VER" != "latest" ]; then
|
||||||
info "Pinned version: $GSD_VER"
|
info "Pinned version: $GSD_VER"
|
||||||
npm install -g "gsd-pi@${GSD_VER}" 2>/dev/null \
|
if npm install -g "gsd-pi@${GSD_VER}" 2>/dev/null; then
|
||||||
&& ok "GSD v2 updated to $GSD_VER" \
|
ok "GSD v2 updated to $GSD_VER"
|
||||||
|| warn "GSD v2 update failed"
|
else
|
||||||
|
warn "GSD v2 update failed"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
info "No pinned version — installing latest"
|
info "No pinned version — installing latest"
|
||||||
npm install -g gsd-pi 2>/dev/null \
|
if npm install -g gsd-pi 2>/dev/null; then
|
||||||
&& ok "GSD v2 updated (latest)" \
|
ok "GSD v2 updated (latest)"
|
||||||
|| warn "GSD v2 update failed"
|
else
|
||||||
|
warn "GSD v2 update failed"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
warn "GSD v2 not installed — skipping (run: npm install -g gsd-pi)"
|
warn "GSD v2 not installed — skipping (run: npm install -g gsd-pi)"
|
||||||
@ -156,13 +164,17 @@ print(d.get('ctx7',{}).get('version',''))
|
|||||||
|
|
||||||
if [ -n "$CTX7_VER" ] && [ "$CTX7_VER" != "latest" ]; then
|
if [ -n "$CTX7_VER" ] && [ "$CTX7_VER" != "latest" ]; then
|
||||||
info "Pinned version: $CTX7_VER"
|
info "Pinned version: $CTX7_VER"
|
||||||
npm install -g "ctx7@${CTX7_VER}" 2>/dev/null \
|
if npm install -g "ctx7@${CTX7_VER}" 2>/dev/null; then
|
||||||
&& ok "ctx7 updated to $CTX7_VER" \
|
ok "ctx7 updated to $CTX7_VER"
|
||||||
|| warn "ctx7 update failed"
|
else
|
||||||
|
warn "ctx7 update failed"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
npm install -g ctx7@latest 2>/dev/null \
|
if npm install -g ctx7@latest 2>/dev/null; then
|
||||||
&& ok "ctx7 updated (latest)" \
|
ok "ctx7 updated (latest)"
|
||||||
|| warn "ctx7 update failed"
|
else
|
||||||
|
warn "ctx7 update failed"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
info "ctx7 not installed — skipping"
|
info "ctx7 not installed — skipping"
|
||||||
@ -172,9 +184,11 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
echo "── Updating Graphifyy..."
|
echo "── Updating Graphifyy..."
|
||||||
if command -v graphify &>/dev/null; then
|
if command -v graphify &>/dev/null; then
|
||||||
pipx upgrade graphifyy 2>/dev/null \
|
if pipx upgrade graphifyy 2>/dev/null; then
|
||||||
&& ok "graphifyy updated" \
|
ok "graphifyy updated"
|
||||||
|| warn "graphifyy update failed — try: pipx upgrade graphifyy"
|
else
|
||||||
|
warn "graphifyy update failed — try: pipx upgrade graphifyy"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
info "graphifyy not installed — skipping"
|
info "graphifyy not installed — skipping"
|
||||||
fi
|
fi
|
||||||
@ -186,10 +200,12 @@ EMIL_DIR="$REPO/skills-external/emil-design-eng"
|
|||||||
EMIL_URL="https://raw.githubusercontent.com/emilkowalski/skill/main/skills/emil-design-eng/SKILL.md"
|
EMIL_URL="https://raw.githubusercontent.com/emilkowalski/skill/main/skills/emil-design-eng/SKILL.md"
|
||||||
if [ -d "$EMIL_DIR" ]; then
|
if [ -d "$EMIL_DIR" ]; then
|
||||||
info "Fetching latest SKILL.md from emilkowalski/skill..."
|
info "Fetching latest SKILL.md from emilkowalski/skill..."
|
||||||
curl -fsSL "$EMIL_URL" -o "$EMIL_DIR/SKILL.md.tmp" \
|
if curl -fsSL "$EMIL_URL" -o "$EMIL_DIR/SKILL.md.tmp" \
|
||||||
&& mv "$EMIL_DIR/SKILL.md.tmp" "$EMIL_DIR/SKILL.md" \
|
&& mv "$EMIL_DIR/SKILL.md.tmp" "$EMIL_DIR/SKILL.md"; then
|
||||||
&& ok "emil-design-eng updated" \
|
ok "emil-design-eng updated"
|
||||||
|| warn "emil-design-eng update failed"
|
else
|
||||||
|
warn "emil-design-eng update failed"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
info "emil-design-eng not installed — skipping (run: make plugin)"
|
info "emil-design-eng not installed — skipping (run: make plugin)"
|
||||||
fi
|
fi
|
||||||
@ -204,9 +220,11 @@ if command -v claude &>/dev/null; then
|
|||||||
while IFS= read -r _p; do
|
while IFS= read -r _p; do
|
||||||
_name="${_p%%@*}"
|
_name="${_p%%@*}"
|
||||||
info "Updating $_name..."
|
info "Updating $_name..."
|
||||||
claude plugin update "$_name" 2>/dev/null \
|
if claude plugin update "$_name" 2>/dev/null; then
|
||||||
&& ok "$_name updated" \
|
ok "$_name updated"
|
||||||
|| warn "$_name update failed"
|
else
|
||||||
|
warn "$_name update failed"
|
||||||
|
fi
|
||||||
done <<< "$_plugins"
|
done <<< "$_plugins"
|
||||||
else
|
else
|
||||||
info "No marketplace plugins installed — skipping"
|
info "No marketplace plugins installed — skipping"
|
||||||
@ -215,11 +233,47 @@ else
|
|||||||
warn "Claude Code not found — skipping plugin update"
|
warn "Claude Code not found — skipping plugin update"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── 9. Refresh symlinks ──
|
# ── 9. Update shellcheck ──
|
||||||
|
echo ""
|
||||||
|
echo "── Updating shellcheck..."
|
||||||
|
if command -v shellcheck &>/dev/null; then
|
||||||
|
# Detect OS for package manager update
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
if brew upgrade shellcheck 2>/dev/null; then
|
||||||
|
ok "shellcheck updated"
|
||||||
|
else
|
||||||
|
ok "shellcheck already up to date"
|
||||||
|
fi
|
||||||
|
elif command -v apt-get &>/dev/null; then
|
||||||
|
if sudo apt-get install -y --only-upgrade shellcheck 2>/dev/null; then
|
||||||
|
ok "shellcheck updated"
|
||||||
|
else
|
||||||
|
ok "shellcheck already up to date"
|
||||||
|
fi
|
||||||
|
elif command -v dnf &>/dev/null; then
|
||||||
|
if sudo dnf upgrade -y shellcheck 2>/dev/null; then
|
||||||
|
ok "shellcheck updated"
|
||||||
|
else
|
||||||
|
ok "shellcheck already up to date"
|
||||||
|
fi
|
||||||
|
elif command -v pacman &>/dev/null; then
|
||||||
|
if sudo pacman -S --noconfirm shellcheck 2>/dev/null; then
|
||||||
|
ok "shellcheck updated"
|
||||||
|
else
|
||||||
|
ok "shellcheck already up to date"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
info "shellcheck installed via binary — update manually"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
info "shellcheck not installed — skipping (run: make plugin)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── 10. Refresh symlinks ──
|
||||||
echo ""
|
echo ""
|
||||||
echo "── Refreshing symlinks..."
|
echo "── Refreshing symlinks..."
|
||||||
bash "$REPO/link.sh"
|
bash "$REPO/link.sh"
|
||||||
|
|
||||||
# ── 10. Run doctor ──
|
# ── 11. Run doctor ──
|
||||||
echo ""
|
echo ""
|
||||||
bash "$REPO/doctor.sh"
|
bash "$REPO/doctor.sh"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user