-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·41 lines (34 loc) · 1.34 KB
/
configure
File metadata and controls
executable file
·41 lines (34 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# constitution package installer
#
# Automatically installs/configures the required packages needed to build PDFs using pdflatex
#
# @author Connor Henley, @thatging3rkid
sudo apt-get update -qq
# Install MiKTeX (if necessary)
if ! [ -x "$(command -v pdflatex)" ]; then
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \
--recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889 > /dev/null
echo "deb https://mirrors.rit.edu/CTAN/systems/win32/miktex/setup/deb `lsb_release -c -s` universe" | \
sudo tee /etc/apt/sources.list.d/miktex.list > /dev/null
sudo apt-get update -qq && sudo apt-get install -y miktex
# check for error
if ! [ $? == 0 ]; then
exit 1;
fi
# Setup MiKTeX and enable auto-package installation
sudo miktexsetup --shared=yes finish
sudo initexmf --admin --set-config-value [MPM]AutoInstall=1
# update the database, this should allow auto-install to work
sudo mpm --admin --update-db
# according to this comment, MiKTeX needs to be updated multiple times smh
# https://github.com/MiKTeX/miktex/issues/724#issuecomment-785949728
sudo mpm --admin --update
mpm --update
sudo mpm --admin --update
mpm --update
fi
# Install GhostScript (used for compression)
if ! [ -x "$(command -v gs)" ]; then
sudo apt-get install -y ghostscript
fi