diff options
author | David Runge <dave@sleepmap.de> | 2015-03-25 16:29:07 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2015-03-25 16:29:07 +0100 |
commit | 32e8f95bb412d6f61afdd18836976061635378e5 (patch) | |
tree | c0e6e65d7c5aa46ce942001051b0c35e97391283 /bin/tex2pdf | |
parent | 6867bda2d82e01c1daf81ee4b39443ecc6609694 (diff) | |
parent | a0ef42e0a70ac6264835ba77936d1ba5bf2294fe (diff) | |
download | dotfiles-32e8f95bb412d6f61afdd18836976061635378e5.tar.gz dotfiles-32e8f95bb412d6f61afdd18836976061635378e5.tar.bz2 dotfiles-32e8f95bb412d6f61afdd18836976061635378e5.tar.xz dotfiles-32e8f95bb412d6f61afdd18836976061635378e5.zip |
Merge branch 'master' of /home/git/repositories/dotfiles
* 'master' of /home/git/repositories/dotfiles: (60 commits)
.config/systemd/user/default.target.wants/*: Deleting all user services. Not good to have them started as root.
export.zsh: Don't use /run/user/ directory for roots TMUX_TMPDIR.
.irssi: Removing irssi as gitmodule, adding it to .gitignore (so it can be added again, without being a gitmodule).
.gitignore: Adding some now unneeded stuff that will popup from time to time.
.zprezto: Updating to c34098af20cafdf016f68f3e7f612ed60ca93aa1
.irssi: Updating .irssi submodule to latest commit.
.vim/addons-settings.vim: Removing powerline support and replacing ugly stuff with ascii characters.
.vdirsyncer/config: Encapsulating paths with ~ in double quotes, as vdirsyncer creates a weird ~ folder in your home otherwise.
termite/config: Switching to Inconsolata (made available through powerline-fonts-git).
pavucontrol.ini: Removing, as it's going to be rewritten each call anyways.
.tmux.conf: Updating colours, incorporating tpm, removing powerline stuff.
.compton.conf: Adding MPlayer to comptons exclude lists.
Updating irssi settings.
.autorandr/*: Clean slate for all autorandr profiles.
.password-store: Updating password store to latest commits.
.gitignore: Removing some unneeded stuff that has been added to the repo.
fonts.conf: Updating to a correct path structure.
.fonts: Removing top level configuration.
.fonts.conf: Adding a custom fontconfig cache dir, so .cache can be a tmpfs and won't need a symlink to the fontconfig directory.
.fonts.conf: Adding a custom fontconfig cache dir, so .cache can be a tmpfs and won't need a symlink to the fontconfig directory.
...
Diffstat (limited to 'bin/tex2pdf')
-rwxr-xr-x | bin/tex2pdf | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/tex2pdf b/bin/tex2pdf index 6eaaef6..fd99224 100755 --- a/bin/tex2pdf +++ b/bin/tex2pdf @@ -1,5 +1,6 @@ #!/bin/bash logdestination="$HOME/.log/tex2pdf.log" +already_open=$(ps aux | grep "$1.pdf" | grep -v "grep") rm -rf $logdestination touch $logdestination echo "tex2pdf called with $1.tex">>$logdestination @@ -18,8 +19,14 @@ echo "################## pdflatex, run #3 #################">>$logdestination echo "#####################################################">>$logdestination pdflatex -interaction=nonstopmode $1.tex>>$logdestination echo "#####################################################">>$logdestination -echo "Launching evince with $1.pdf.">>$logdestination -evince $1.pdf & +echo "Launching mupdf with $1.pdf.">>$logdestination + +if [ -n "$already_open" ]; then + kill "$(echo $already_open | awk '{print $2}')" + echo "Killing pid $(echo $already_open | awk '{print $2}'), which has $1.pdf open already." >>$logdestination +fi +mupdf $1.pdf & + echo "#####################################################">>$logdestination echo "Removing aux,bbl,blg,dvi,lof,log,lot,nav,out,snm,toc.">>$logdestination echo "Current directory: $(pwd) and children of depth 1.">>$logdestination |