Files
homeclaw/scripts/install-kicad-libs.sh
T

16 lines
776 B
Bash
Executable File

#!/usr/bin/env bash
# PCB 앱용 KiCad 공식 부품 라이브러리(풋프린트 + 심볼)를 .smallclaw/tools/kicad-libs/ 에 설치/갱신한다.
# 라이선스: CC-BY-SA 4.0 (+ 설계물에 쓰는 데 대한 예외) — https://www.kicad.org/libraries/license/
set -euo pipefail
DIR="$(cd "$(dirname "$0")/.." && pwd)/.smallclaw/tools/kicad-libs"
mkdir -p "$DIR"
for repo in kicad-footprints kicad-symbols; do
if [ -d "$DIR/$repo/.git" ]; then
git -C "$DIR/$repo" pull --ff-only --depth 1 -q || true
else
git clone --depth 1 -q "https://gitlab.com/kicad/libraries/$repo.git" "$DIR/$repo"
fi
echo "$repo: $(git -C "$DIR/$repo" log -1 --format='%h %cs')"
done
rm -f "$DIR/index-fp.json" "$DIR/index-sym.json" # 색인은 다음 사용 때 다시 만든다