Skip to content

Instantly share code, notes, and snippets.

@inducer
Created September 16, 2020 16:28
Show Gist options
  • Save inducer/908a2efd854092f29130e9274fe61e0d to your computer and use it in GitHub Desktop.
Save inducer/908a2efd854092f29130e9274fe61e0d to your computer and use it in GitHub Desktop.
Arxiv submission script
#! /bin/zsh
setopt -o EXTENDED_GLOB
set -e
set -x
if [ "$(uname)" = "Darwin" ]; then
TAR=gtar
else
TAR=tar
fi
MAIN_TEX=interface-paper.tex
"$TAR" cvfz submission.tar.gz --transform='s,.*/,,' \
"$MAIN_TEX" *.bib figures/*.png figures/*.pdf figures/data/*.dat out/*.bbl
rm -f submission.zip
rm -Rf submission-zip
mkdir submission-zip
(cd submission-zip; tar xvfz ../submission.tar.gz)
python purge-comments.py "$MAIN_TEX" > "submission-zip/$MAIN_TEX"
zip submission.zip -r submission-zip
rm -Rf submission-zip submission.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment