-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·34 lines (27 loc) · 1.07 KB
/
install.sh
File metadata and controls
executable file
·34 lines (27 loc) · 1.07 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
#!/bin/sh
echo "OL FONTS INSTALLATION SCRIPT"
echo "This bash script copies the OL font files to your LaTeX user folder. You may be prompted for your system password to enable copying."
# Use the inbuilt kpsewhich function to hunt down the system texmf directory
echo "Detecting TeX directory..."
TEXDIR=`kpsewhich -var-value=TEXMFHOME`
# Check to make sure that TEXDIR is set before copying
if [[ -z $TEXDIR ]]
then
echo "No TeX directory detected. Unable to proceed. Exiting..."
exit 1
else
# Set up the ../tex/latex file-path if it doesn't already exist
if [[ ! -d "$TEXDIR/tex/latex" ]]
then
echo "Creating file-paths..."
sudo mkdir -p $TEXDIR/tex/latex
fi
# Recursively copy the appropriate directories in the current directory to the system directory
echo "Copying files..."
sudo cp -R -p ${0%/*}/bigdaddy $TEXDIR/tex/latex/
echo "Copying bigdaddy..."
echo "Done!"
fi
echo "Rehashing TeX packages so the system sees the new package"
sudo texhash
echo "Installation successful. You can now put \usepackage{bigdaddy} in your preamble and enjoy."