Created
December 14, 2022 13:19
-
-
Save jgru/56490a666505bf181de43dc36403c216 to your computer and use it in GitHub Desktop.
Helper script to create a publishable tarball containing all the TeX-sources
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 | |
PROJ="paper-724_" | |
INDIR="final/" | |
OUTDIR="$(date +%Y-%m-%d)_${PROJ}" | |
CWD="$(pwd)" | |
ARCH=".zip" # or .tar.gz | |
# Create tmp directory | |
TMP=$(mktemp -d) | |
mkdir -p ${TMP}/${OUTDIR} | |
cp -r ${INDIR}/* ${TMP}/${OUTDIR}/ | |
cd ${TMP}/${OUTDIR}/ | |
# Build the doc | |
make purge | |
rm -rf copyright-agreement | |
rm -rf .auctex-auto | |
cd ${TMP} | |
if [[ ${ARCH} == ".zip" ]]; | |
then | |
zip -r ${OUTDIR}.zip ./${OUTDIR} | |
cp ${OUTDIR}.zip ${CWD}/ | |
else | |
tar -czvf ${OUTDIR}.tar.gz ./${OUTDIR} | |
cp ${OUTDIR}.tar ${CWD}/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment