At work I have set up a little backup script on my Ubuntu 14.04.1 machine. The script backs up my machine to an external hard drive. After this is done it copies a LaTeX project to my Dropbox and compiles it. This project is some kind of a logbook of my work.
I know this is a rather unconventional use case and I could just copy the source or push it to a git repo but first of all git would be a bit of an overkill and second of all there were already two instances where I was glad for having it in pdf form on my mobile when I had to start up a tty shell because gnome wouldn't start up.
The problem now is that for some reason both pdflatex and lualatex tell me that they can't find the
.sty files. The backup script is the following:
#!/bin/bash # .... some system backup code .... ## sync linux setup document to Dropbox # remove .pdf in order to guarantee that project is compiled rm /home/user/Documents/LaTeX/logBook/logBook.pdf # compile project in origin make -C /home/user/Documents/LaTeX/logBook/ >> /home/user/Documents/LaTeX/logBook/makeLog # copy files to destination cp -rp /home/user/Documents/LaTeX/logBook/ /home/wright/Dropbox
Makefile contains the following lines:
SHELL=bash TARGET=linuxSetup.pdf FLAGS= --shell-escape SRC= ./*.tex ./header/*.tex ./chapters/*.tex ./references/*.bib ./titlepage/*.tex TIKZ= ./tikz/*.tex LL= pdflatex all: $(TARGET) $(TARGET): $(TARGET:%.pdf=%.tex) $(SRC) $(TIKZ) @$(LL) $(FLAGS) $< # makeglossaries $(TARGET:%.pdf=%"") # makeindex -s headingsStyle.ist $(TARGET:%.pdf=%.idx) # bibtex $(TARGET:%.pdf=%"") @$(LL) $(FLAGS) $< @$(LL) $(FLAGS) $<
The backup script is placed in
/etc/init.d/backup and contains a symbolic link to
The scripts are simple enough, yet they still won't find the
.sty files. I tried excluding the
.sty files to find out if the problem was caused by specific ones but regardless of how many I exclude there are always more that the compiler won't find. I switched the compiler yet that does not seem to be the issue either. And also I executed the complete backup script via
sudo or as the root user, both of which worked perfectly fine without any errors.
What am I missing?