From c4ae4c53790c79777398daedf9919aac86e51255 Mon Sep 17 00:00:00 2001 From: "J. Kirby Ross" Date: Wed, 26 Nov 2025 12:23:17 -0800 Subject: [PATCH 1/2] Add arXiv packaging helper script --- aion-holography/scripts/make-arxiv.sh | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 aion-holography/scripts/make-arxiv.sh diff --git a/aion-holography/scripts/make-arxiv.sh b/aion-holography/scripts/make-arxiv.sh new file mode 100755 index 0000000..3b94f8e --- /dev/null +++ b/aion-holography/scripts/make-arxiv.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Build and package an arXiv-ready tarball for aion-holography. +# Output: ax.tar in repository root. +# +# Steps: +# 1. Build main.pdf (to generate an up-to-date main.bbl). +# 2. Collect only the files arXiv needs: *.tex, Makefile, main.bbl. +# (No .bib, .pdf, or aux files.) +# 3. Strip leading comment lines from .tex sources. +# 4. Create ax.tar at repo root. +# +# Usage: scripts/make-arxiv.sh + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +SRC="${ROOT}/aion-holography" +OUT="${ROOT}/ax.tar" + +echo "==> Building PDF to refresh main.bbl" +cd "${SRC}" +latexmk -pdf main.tex >/dev/null + +echo "==> Assembling arXiv payload" +WORKDIR="$(mktemp -d "${ROOT}/arxiv.XXXXXX")" +trap 'rm -rf "${WORKDIR}"' EXIT + +# Copy only the needed files. +rsync -a --prune-empty-dirs \ + --include 'Makefile' \ + --include '*.tex' \ + --include 'main.bbl' \ + --exclude '*' \ + "${SRC}/" "${WORKDIR}/" + +# Strip full-line comments from .tex sources (keep inline %). +find "${WORKDIR}" -maxdepth 1 -name '*.tex' -type f -print0 | while IFS= read -r -d '' f; do + perl -ni -e 'next if /^\\s*%/; print' "$f" +done + +echo "==> Creating ax.tar at ${OUT}" +tar -C "${WORKDIR}" -cvf "${OUT}" . >/dev/null +echo "Wrote ${OUT}" From 0cd96f84259ee90ab999ad95b7dc56f7c23f96f0 Mon Sep 17 00:00:00 2001 From: James Ross Date: Wed, 26 Nov 2025 17:45:39 -0800 Subject: [PATCH 2/2] Update aion-holography/scripts/make-arxiv.sh Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: James Ross --- aion-holography/scripts/make-arxiv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aion-holography/scripts/make-arxiv.sh b/aion-holography/scripts/make-arxiv.sh index 3b94f8e..fb8364e 100755 --- a/aion-holography/scripts/make-arxiv.sh +++ b/aion-holography/scripts/make-arxiv.sh @@ -39,5 +39,5 @@ find "${WORKDIR}" -maxdepth 1 -name '*.tex' -type f -print0 | while IFS= read -r done echo "==> Creating ax.tar at ${OUT}" -tar -C "${WORKDIR}" -cvf "${OUT}" . >/dev/null +tar -C "${WORKDIR}" -cf "${OUT}" . >/dev/null echo "Wrote ${OUT}"