summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall_prepare.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/install_prepare.sh b/install_prepare.sh
index ced8f40..d84b4d8 100755
--- a/install_prepare.sh
+++ b/install_prepare.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
set -xeuo pipefail
abbrgen_execname="modules/abbrgen/abbreviation_gen_`uname`"
@@ -10,7 +10,8 @@ test -f modules/unicode/UnicodeData.txt || \
mkdir -p static/fonts
test -f static/fonts/mononoki-Regular.woff || {
- wget 'https://github.com/madmalik/mononoki/releases/download/1.2/mononoki.zip' -O /tmp/mononoki.zip
- trap "rm /tmp/mononoki.zip" EXIT
- unzip /tmp/mononoki.zip -d static/fonts/
+ tmpdir=$(mktemp -d)
+ trap "rm -rf '$tmpdir'" EXIT
+ wget 'https://github.com/madmalik/mononoki/releases/download/1.2/mononoki.zip' -O "$tmpdir"/mononoki.zip
+ unzip "$tmpdir"/mononoki.zip -d static/fonts/
}