tmp: Fix invalid use of tilde expansion

This commit is contained in:
Salt 2020-10-29 23:36:47 -05:00
parent d0846d2b5b
commit 74a38a5983

4
tmp
View File

@ -53,12 +53,12 @@ done
# Copy in template directory
if [ -n "$1" ]; then
# Source in XDG dirs, if they exist
userdirs="${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs"
userdirs="${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs"
if [ -f "$userdirs" ]; then
source "$userdirs"
fi
unset userdirs
copydir="${XDG_TEMPLATES_DIR:-~/Templates}/.tmp/$1"
copydir="${XDG_TEMPLATES_DIR:-$HOME/Templates}/.tmp/$1"
if ! [ -d "$copydir" ]; then
log "Could not find template directory \"$copydir\""
exit 3