From fb2b1376b125a9c7ec3a6dfdd4b482e9f59ebf6c Mon Sep 17 00:00:00 2001 From: "Ziji Shi (Steven)" Date: Mon, 1 Apr 2019 12:33:33 +0800 Subject: [PATCH] fix xdg-open not found error on MacOS --- tikzmake.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tikzmake.sh b/tikzmake.sh index 9fbc082..560ca43 100644 --- a/tikzmake.sh +++ b/tikzmake.sh @@ -7,5 +7,8 @@ pdflatex $1.tex rm *.aux *.log *.vscodeLog rm *.tex -xdg-open $1.pdf - +if [[ "$OSTYPE" == "darwin"* ]]; then + open $1.pdf +else + xdg-open $1.pdf +fi