2023-10-23 20:34:42 +00:00
|
|
|
#!/bin/bash
|
2023-10-24 17:15:47 +00:00
|
|
|
BUILDFILES=("mskor_resume.tex","altacv.cls","README.md","build.sh","output.txt","mskor_resume.pdf","mskor_resume.png")
|
2023-10-23 20:34:42 +00:00
|
|
|
echo "Building resume and deleting output.txt"
|
|
|
|
rm output.txt
|
|
|
|
echo "Building resume" | tee -a output.txt
|
|
|
|
echo -e "Generating resume PDF" | tee -a output.txt
|
2023-10-24 17:15:47 +00:00
|
|
|
pdflatex mskor_resume.tex -o mskor_resume.pdf > /dev/null
|
2023-10-23 20:34:42 +00:00
|
|
|
echo -e "Deleting build files" | tee -a output.txt
|
|
|
|
FILES=$(ls -r)
|
|
|
|
for file in $FILES
|
|
|
|
do
|
|
|
|
if [[ " ${BUILDFILES[*]} " != *"$file"* ]];
|
|
|
|
then
|
|
|
|
rm $file
|
|
|
|
fi
|
|
|
|
done
|
2023-10-24 17:15:47 +00:00
|
|
|
echo -e "Creating PNG version" | tee -a output.txt
|
|
|
|
convert -density 150 mskor_resume.pdf -quality 90 mskor_resume.png
|
2023-10-23 20:34:42 +00:00
|
|
|
echo -e "Done." | tee -a output.txt
|