.resource/ clashed with resource/ (the tracked data folder), so rename the hidden image folder to .image/ for clarity. Re-zip resource/images.zip to contain .image/ and update setup.sh, .gitignore, README.md, AGENTS.md and all image references in ui/.
24 lines
991 B
Bash
Executable File
24 lines
991 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# ============================================================
|
|
# AT Transit mockup — แตกไฟล์รูปภาพ
|
|
# รันครั้งเดียวหลัง clone เพื่อแตก resource/images.zip → .image/
|
|
# (idempotent: ถ้ามี .image/ อยู่แล้วจะข้าม)
|
|
# ============================================================
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
if [ -d .image ]; then
|
|
echo "✔ .image/ มีอยู่แล้ว — ข้ามการแตกไฟล์"
|
|
exit 0
|
|
fi
|
|
|
|
if ! command -v unzip >/dev/null 2>&1; then
|
|
echo "✘ ไม่พบคำสั่ง unzip — ติดตั้งก่อน (brew install unzip) หรือแตก resource/images.zip เอง" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "→ กำลังแตก resource/images.zip ..."
|
|
unzip -q resource/images.zip
|
|
echo "✔ เสร็จ — รูปทั้งหมดอยู่ที่ .image/"
|