disabled log removal, del old build files on startup, shellcheck fixes
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Adapted from github.com/gkilleen33/overleaf-offline under the MIT license
|
||||
|
||||
# Add build files to gitignore
|
||||
cd /app/project
|
||||
# CD into the main directory
|
||||
cd /app/project || exit 2
|
||||
|
||||
if test -f ".autoltx"; then
|
||||
echo AutoLTX already installed, skipping steup
|
||||
if test -d "pdf/"; then
|
||||
rm -r pdf/
|
||||
fi
|
||||
|
||||
# Update old installation
|
||||
if test -f ".autoltxXenon"; then # Intentional wrong file name checking, to ensure the files are updated everytime the container starts. To implement version checking in later version.
|
||||
echo AutoLTX already installed, skipping steup
|
||||
else
|
||||
if test -f ".gitignore"; then
|
||||
if test -f ".gitignore"; then
|
||||
# Adding build files to .gitignore
|
||||
grep -qxF 'pdf/' .gitignore || echo 'pdf/' >> .gitignore
|
||||
grep -qxF 'latexmkrc' .gitignore || echo 'latexmkrc' >> .gitignore
|
||||
@@ -17,18 +21,16 @@ if test -f ".gitignore"; then
|
||||
grep -qxF 'output.pdf' .gitignore || echo 'output.pdf' >> .gitignore
|
||||
touch .autoltx
|
||||
echo Configuring AutoLTX for this project
|
||||
else
|
||||
else
|
||||
# Creating .gitignore file
|
||||
printf 'pdf/\nlatexmkrc\ncompile.sh\n.autoltx\noutput.pdf\n' >> .gitignore
|
||||
touch .autoltx
|
||||
fi
|
||||
|
||||
# mkdir -p pdf/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
|
||||
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user