summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2022-02-06 13:16:16 +0100
committertomsmeding <tom.smeding@gmail.com>2022-02-06 13:16:16 +0100
commitb189292ed6f2e0229919da280285ca3cf1bda0ae (patch)
tree6076dfdcb387a63c83d3dc70b5d882c68648d0ad
parentd601d0431d6a35ce55680af9987c2ecfee719870 (diff)
Make install_prepare.sh more distro-independent
-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/
}