Skip to content

Instantly share code, notes, and snippets.

@Dih5
Created December 13, 2017 12:52
Show Gist options
  • Save Dih5/a22d8659d139fcfaabdfc0fbc6951c0c to your computer and use it in GitHub Desktop.
Save Dih5/a22d8659d139fcfaabdfc0fbc6951c0c to your computer and use it in GitHub Desktop.
Update a pdf from an Overleaf project cloning it with git
#!/bin/bash
# Update a pdf from an Overleaf project cloning it with git
# pdflatex + bibtex used for compilation
PROJECTID=12345678my-secret-id
FILENAME=main
pushd .
cd /tmp && git clone https://git.overleaf.com/$PROJECTID && cd $PROJECTID && pdflatex $FILENAME.tex && bibtex $FILENAME && pdflatex $FILENAME.tex && pdflatex $FILENAME.tex
popd
cp /tmp/$PROJECTID/$FILENAME.pdf .
rm -rf /tmp/$PROJECTID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment