mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 02:18:40 +03:00
Fix ac-ms-media-transcode seed when workspace checkout is empty stub.
Prefer /mnt/repos/ac/ac-ms-media-transcode copy when workspace tree lacks bin/run.sh and pirate_drift.png. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,19 @@ ensure_ac_ms_media_transcode() {
|
||||
_mt="${WS}/ac-ms-media-transcode"
|
||||
_origin="${AC_MEDIA_TRANSCODE_ORIGIN:-git://f0xx.org/ac/ac-ms-media-transcode}"
|
||||
_branch="${AC_GIT_BRANCH:-next}"
|
||||
_seed="${AC_ROOT:-/mnt/repos/ac}/ac-ms-media-transcode"
|
||||
if [ -f "${_mt}/assets/pirate_drift.png" ] && [ -x "${_mt}/bin/run.sh" ]; then
|
||||
log "ac-ms-media-transcode OK at ${_mt}"
|
||||
chmod +x "${_mt}/bin/"*.sh 2>/dev/null || true
|
||||
return 0
|
||||
fi
|
||||
if [ -f "${_seed}/assets/pirate_drift.png" ] && [ -d "${_seed}/.git" ]; then
|
||||
log "seed ac-ms-media-transcode from ${_seed} → ${_mt}"
|
||||
rm -rf "${_mt}"
|
||||
cp -a "${_seed}" "${_mt}"
|
||||
chmod +x "${_mt}/bin/"*.sh 2>/dev/null || true
|
||||
return 0
|
||||
fi
|
||||
if [ -d "${_mt}/.git" ]; then
|
||||
log "update ac-ms-media-transcode in ${_mt}"
|
||||
git -C "${_mt}" fetch origin 2>/dev/null || true
|
||||
@@ -24,6 +37,7 @@ ensure_ac_ms_media_transcode() {
|
||||
|| git -C "${_mt}" reset --hard "origin/${_branch}" 2>/dev/null || true
|
||||
else
|
||||
log "clone ac-ms-media-transcode → ${_mt}"
|
||||
rm -rf "${_mt}"
|
||||
git clone --branch "${_branch}" "${_origin}" "${_mt}"
|
||||
fi
|
||||
chmod +x "${_mt}/bin/"*.sh 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user