summaryrefslogtreecommitdiff
path: root/stacks/crdop/scripts/refresh-vendor-ardopcf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/crdop/scripts/refresh-vendor-ardopcf.sh')
-rwxr-xr-xstacks/crdop/scripts/refresh-vendor-ardopcf.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/stacks/crdop/scripts/refresh-vendor-ardopcf.sh b/stacks/crdop/scripts/refresh-vendor-ardopcf.sh
new file mode 100755
index 0000000..b9d2f93
--- /dev/null
+++ b/stacks/crdop/scripts/refresh-vendor-ardopcf.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+# Maintainer tool: re-download upstream ardopcf and re-apply CRDOP patches.
+# Normal builds use the committed vendor/ardopcf tree — no network required.
+set -euo pipefail
+
+ROOT="$(cd "$(dirname "$0")/.." && pwd)"
+VENDOR="${ROOT}/vendor/ardopcf"
+REF_FILE="${ROOT}/vendor/ardopcf.ref"
+URL="${CRDOP_UPSTREAM_URL:-https://github.com/pflarue/ardop.git}"
+PIN="$(grep '^commit_full=' "${REF_FILE}" 2>/dev/null | cut -d= -f2- | head -1)"
+PIN="${PIN:-$(grep '^commit=' "${REF_FILE}" 2>/dev/null | cut -d= -f2- | head -1)}"
+
+echo "This replaces vendor/ardopcf from upstream. Press Ctrl+C to abort."
+sleep 2
+
+rm -rf "${VENDOR}"
+git clone --depth 1 --branch master "${URL}" "${VENDOR}"
+if [[ -n "${PIN}" ]]; then
+ git -C "${VENDOR}" fetch --depth 1 origin "${PIN}"
+ git -C "${VENDOR}" checkout "${PIN}"
+fi
+rm -rf "${VENDOR}/.git"
+rm -f "${VENDOR}/.crdop-patches-applied"
+
+"${ROOT}/scripts/apply-vendor-patches.sh"
+echo "Done. Review diff, update vendor/ardopcf.ref if needed, commit vendor/ardopcf/"
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com