yakcloud init: 아카이브(무응답) 대신 git clone 방식으로 변경

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-27 17:02:29 +09:00
parent 0110be0558
commit 8067507e6b
2 changed files with 14 additions and 4 deletions

View File

@ -22,8 +22,13 @@ cmd_init() {
die "폴더가 비어있지 않습니다. 빈 폴더에서 실행하거나 'yakcloud init <name>' 로 새 폴더에 생성하세요."
fi
info "yakcloud-starter 내려받는 중… ($REPO @ $BRANCH)"
curl -fsSL "$REPO/archive/$BRANCH.tar.gz" | tar xz --strip-components=1 \
|| die "스타터 다운로드 실패 — 네트워크/레포 공개 여부 확인"
command -v git >/dev/null 2>&1 || die "git 이 필요합니다."
local tmp; tmp="$(mktemp -d)"
git clone -q --depth 1 -b "$BRANCH" "$REPO.git" "$tmp/s" \
|| { rm -rf "$tmp"; die "스타터 클론 실패 — 네트워크/레포 공개 여부 확인 ($REPO)"; }
rm -rf "$tmp/s/.git"
cp -R "$tmp/s/." . # 숨김파일 포함 전부 현재 폴더로
rm -rf "$tmp"
# 프로젝트 이름 치환(선택)
if [ -n "$name" ] && [ -f yakcloud.yaml ]; then
sed -i.bak "s/^project: .*/project: $name/" yakcloud.yaml && rm -f yakcloud.yaml.bak

View File

@ -22,8 +22,13 @@ cmd_init() {
die "폴더가 비어있지 않습니다. 빈 폴더에서 실행하거나 'yakcloud init <name>' 로 새 폴더에 생성하세요."
fi
info "yakcloud-starter 내려받는 중… ($REPO @ $BRANCH)"
curl -fsSL "$REPO/archive/$BRANCH.tar.gz" | tar xz --strip-components=1 \
|| die "스타터 다운로드 실패 — 네트워크/레포 공개 여부 확인"
command -v git >/dev/null 2>&1 || die "git 이 필요합니다."
local tmp; tmp="$(mktemp -d)"
git clone -q --depth 1 -b "$BRANCH" "$REPO.git" "$tmp/s" \
|| { rm -rf "$tmp"; die "스타터 클론 실패 — 네트워크/레포 공개 여부 확인 ($REPO)"; }
rm -rf "$tmp/s/.git"
cp -R "$tmp/s/." . # 숨김파일 포함 전부 현재 폴더로
rm -rf "$tmp"
# 프로젝트 이름 치환(선택)
if [ -n "$name" ] && [ -f yakcloud.yaml ]; then
sed -i.bak "s/^project: .*/project: $name/" yakcloud.yaml && rm -f yakcloud.yaml.bak