remove useless if

This commit is contained in:
illiliti 2020-02-24 23:04:24 +03:00
parent e5a23b9708
commit affdc030ae

View File

@ -80,14 +80,7 @@ parse_conf() {
create_workdir() { create_workdir() {
msg info "creating working directory" msg info "creating working directory"
if [ "$XDG_CACHE_HOME" ]; then workdir="${XDG_CACHE_HOME:-${TMPDIR:-/tmp}}/initramfs.$$"
workdir="${XDG_CACHE_HOME}/initramfs.$$"
elif [ "$TMPDIR" ]; then
workdir="${TMPDIR}/initramfs.$$"
else
workdir="/tmp/initramfs.$$"
fi
mkdir "$workdir" || msg panic "failed to create working directory" mkdir "$workdir" || msg panic "failed to create working directory"
} }