-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_arxiv.sh
More file actions
executable file
·40 lines (33 loc) · 1.33 KB
/
create_arxiv.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env sh
# This script creates a tar.gz file suitable for submission to arXiv.
# https://info.arxiv.org/help/submit_tex.html
# https://trevorcampbell.me/html/arxiv.html
if command -v rsync &> /dev/null; then :; else
echo "rsync was not found. Installing."
sudo apt-get update
sudo apt-get install rsync
fi
if [ ! -f main.bbl ]; then
echo "main.bbl was not found. Compiling the LaTeX files to create it."
make all
fi
echo "Removing existing arxiv folder and zip file."
rm -rf arxiv arxiv.zip
echo "Creating the arxiv folder and adding files."
mkdir arxiv
mkdir arxiv/anc
# Rsync is used to enable excluding.
rsync -av --exclude='fig/*-converted-to.pdf' --exclude='fig/lecture_notes' --exclude='fig/tampere' --exclude='tex/other_models.tex' \
fig tex \
.latexmkrc babelbst.tex biblatex-dm.cfg englbst.tex finnbst.tex LICENSE \
main.tex Makefile swedbst.tex tktl.bst UH-logo.png UH_TCM_MSc.cls \
arxiv
# Ancillary files are placed in the anc directory.
# https://info.arxiv.org/help/ancillary_files.html
rsync -av --exclude='**/__pycache__' --exclude='*.pyc' --exclude=msc2_python/logs --exclude=msc2_python/tampere \
--exclude msc2_python/comparison.py \
msc2_python create_arxiv.sh arxiv/anc
cp -r .github arxiv/anc/github
echo "Creating arxiv.tar.gz"
tar -czvf arxiv.tar.gz arxiv
echo "arxiv.tar.gz created successfully."