#!/bin/sh # Remove frozen git://f0xx.org/android_cast checkout from cluster nodes. # Run once after switching to ac/* compose deploy (populate uses ac-workspace only). set -eu ROOT="$(cd "$(dirname "$0")/.." && pwd)" # shellcheck source=/dev/null . "$ROOT/scripts/lib/common.sh" load_cluster_env LEGACY="${APP_ROOT}/android_cast" if [ ! -e "$LEGACY" ]; then log "no legacy monolith at $LEGACY — nothing to purge" exit 0 fi if [ -d "${LEGACY}/.git" ]; then _url="$(git -C "$LEGACY" config --get remote.origin.url 2>/dev/null || true)" case "$_url" in *android_cast*) log "removing legacy monolith $_url at $LEGACY" ;; *) warn "unexpected origin $_url — not removing (manual review)" exit 1 ;; esac fi rm -rf "$LEGACY" log "purge-legacy-monolith_ok $(host_short)"