Created
December 7, 2016 18:20
-
-
Save pcapriotti/8df7eb193470497f759ffa203e2ebcaf to your computer and use it in GitHub Desktop.
ArXiv submission script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# prepare submission tarball for arXiv.org | |
set -e | |
usage() { | |
echo "Usage: $0 DEST SOURCE..." | |
exit 1 | |
} | |
on_exit() { | |
[ -z "$tmpdir" ] || rm -fr "$tmpdir" | |
} | |
[ "$#" -gt 1 ] || usage | |
out="$1" | |
shift | |
basedir="$PWD" | |
tmpdir=`mktemp -d` | |
trap on_exit EXIT | |
cp "$@" "$tmpdir" | |
cd "$tmpdir" | |
sed -i '1 a \\\\pdfoutput=1' *.tex || true | |
zip -r "$basedir/$out" . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment