init commit
This commit is contained in:
32
setupFiles/install.sh
Normal file
32
setupFiles/install.sh
Normal 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
|
||||
Reference in New Issue
Block a user