init commit

This commit is contained in:
2025-09-08 23:18:15 +05:30
parent 182bdc2b5a
commit 38a464e907
5 changed files with 293 additions and 0 deletions

32
setupFiles/install.sh Normal file
View File

@@ -0,0 +1,32 @@
#! /bin/bash
# Adapted from github.com/gkilleen33/overleaf-offline under the MIT license
# Add build files to gitignore
cd /app/project
if test -f ".autoltx"; then
echo AutoLTX already installed, skipping steup
else
if test -f ".gitignore"; then
# Adding build files to .gitignore
grep -qxF 'build/' .gitignore || echo 'build/' >> .gitignore
grep -qxF 'latexmkrc' .gitignore || echo 'latexmkrc' >> .gitignore
grep -qxF 'compile.sh' .gitignore || echo 'compile.sh' >> .gitignore
grep -qxF '.autoltx' .gitignore || echo '.autoltx' >> .gitignore
touch .autoltx
echo Configuring AutoLTX for this project
else
# Creating .gitignore file
printf 'build/\nlatexmkrc\ncompile.sh\n' >> .gitignore
fi
# mkdir -p build/config
# Add latexmk rc file to build files
cp /app/setupFiles/latexmkrc /app/project/
# Add compile script to build files
cp /app/setupFiles/compile.sh /app/project
chmod +x compile.sh
fi