git clone https://git.lucas.co/fontpreview.git
Create temp directory
to contain fontopreview temp files.
fontpreview | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fontpreview b/fontpreview
index 3b3442b..ed4e373 100755
--- a/fontpreview
+++ b/fontpreview
@@ -6,9 +6,10 @@
# Use mktemp to create temporary files that won't
# collide with any other application's tmp files.
-PIDFILE="$(mktemp --tmpdir fontpreview_XXXXXXXX.pid)"
-FONT_PREVIEW="$(mktemp --tmpdir fontpreview_XXXXXXXX.png)"
-TERMWIN_IDFILE="$(mktemp --tmpdir fontpreview_XXXXXXXX.termpid)"
+FONTPREVIEW_DIR="$(mktemp -d --tmpdir fontpreview_dir_XXXXXXXX)"
+PIDFILE="$(mktemp --tmpdir="$FONTPREVIEW_DIR" fontpreview_XXXXXXXX.pid)"
+FONT_PREVIEW="$(mktemp --tmpdir="$FONTPREVIEW_DIR" fontpreview_XXXXXXXX.png)"
+TERMWIN_IDFILE="$(mktemp --tmpdir="$FONTPREVIEW_DIR" fontpreview_XXXXXXXX.termpid)"
VERSION=1.0.0
# Default values