From 33b0487a93c6f791e50a5bb4c976852ad05bda6c Mon Sep 17 00:00:00 2001 From: lucidiot Date: Fri, 16 Sep 2022 09:04:15 +0200 Subject: [PATCH] Default values for USER env var --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index f008269..38639c7 100755 --- a/build.sh +++ b/build.sh @@ -2,8 +2,8 @@ set -euo pipefail shopt -s globstar -tree_output=$(mktemp "/tmp/$USER.XXXXXXXXXX") -tree_file=$(mktemp "/tmp/$USER.XXXXXXXXXX") +tree_output=$(mktemp "/tmp/${USER:-lucidiot-wiki}.XXXXXXXXXX") +tree_file=$(mktemp "/tmp/${USER:-lucidiot-wiki}.XXXXXXXXXX") trap "rm \"$tree_output\" \"$tree_file\"" EXIT # Variables included in the pandoc template @@ -20,7 +20,7 @@ function convert { --table-of-contents \ --template template.html \ --highlight-style zenburn \ - --css "/~$USER/theme.css" \ + --css "/~${USER:-lucidiot}/theme.css" \ --variable generator="$generator" \ --variable now="$now" \ -o "$2" \