From affdc030aef9a40fbe444d11c3e5e90749194797 Mon Sep 17 00:00:00 2001 From: illiliti Date: Mon, 24 Feb 2020 23:04:24 +0300 Subject: [PATCH] remove useless if --- tinyramfs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tinyramfs b/tinyramfs index 04bbb05..25c39dd 100755 --- a/tinyramfs +++ b/tinyramfs @@ -80,14 +80,7 @@ parse_conf() { create_workdir() { msg info "creating working directory" - if [ "$XDG_CACHE_HOME" ]; then - workdir="${XDG_CACHE_HOME}/initramfs.$$" - elif [ "$TMPDIR" ]; then - workdir="${TMPDIR}/initramfs.$$" - else - workdir="/tmp/initramfs.$$" - fi - + workdir="${XDG_CACHE_HOME:-${TMPDIR:-/tmp}}/initramfs.$$" mkdir "$workdir" || msg panic "failed to create working directory" }