Claude Code 네이티브 statusLine 방식의 4줄 상태바 스크립트와 어느 머신에서든 한 줄로 설치·업데이트할 수 있는 스크립트 추가. 크로스플랫폼(Linux/macOS) stat 호환 처리 포함. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ccstatusline-config updater
|
|
# 원격 저장소에서 최신 statusline을 가져와 설치합니다.
|
|
#
|
|
# 사용법:
|
|
# ~/.claude/update-statusline.sh
|
|
#
|
|
# 또는 원격 실행:
|
|
# curl -sSL https://git.scrutineer.co.kr/zaksal58/ccstatusline-config/raw/branch/main/update.sh | bash
|
|
|
|
set -euo pipefail
|
|
|
|
REPO_URL="https://git.scrutineer.co.kr/zaksal58/ccstatusline-config.git"
|
|
CLAUDE_DIR="${HOME}/.claude"
|
|
STATUSLINE_SCRIPT="${CLAUDE_DIR}/statusline.sh"
|
|
|
|
GREEN=$'\033[92m'
|
|
CYAN=$'\033[96m'
|
|
YELLOW=$'\033[93m'
|
|
BOLD=$'\033[1m'
|
|
RESET=$'\033[0m'
|
|
|
|
info() { echo "${CYAN}[INFO]${RESET} $*"; }
|
|
ok() { echo "${GREEN}[OK]${RESET} $*"; }
|
|
warn() { echo "${YELLOW}[WARN]${RESET} $*"; }
|
|
|
|
tmpdir=$(mktemp -d)
|
|
trap 'rm -rf "$tmpdir"' EXIT
|
|
|
|
info "최신 statusline 가져오는 중..."
|
|
git clone --depth 1 "$REPO_URL" "$tmpdir" >/dev/null 2>&1
|
|
|
|
if diff -q "${tmpdir}/statusline.sh" "$STATUSLINE_SCRIPT" >/dev/null 2>&1; then
|
|
ok "이미 최신 버전입니다."
|
|
exit 0
|
|
fi
|
|
|
|
cp "${tmpdir}/statusline.sh" "$STATUSLINE_SCRIPT"
|
|
chmod +x "$STATUSLINE_SCRIPT"
|
|
ok "statusline.sh 업데이트 완료!"
|
|
echo " Claude Code를 다시 시작하면 적용됩니다."
|