ptgdp: Allow overriding of XDG_MUSIC_DIR

While a real ghetto hack, this does allow changing where it looks for your MPD library
This commit is contained in:
Salt 2019-08-14 04:15:28 -05:00
parent e3e9e92838
commit 83a32b0090

2
ptgdp
View File

@ -14,7 +14,7 @@ _name="$(basename -- "$0")"
_tmpdir="${XDG_CACHE_HOME:-$HOME/.cache}/$_name"
_tmpfile="$_tmpdir/tmpfile-$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 12)"
_xdguserdirs="${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs"
[ -f "$_xdguserdirs" ] && source "$_xdguserdirs"
[ -z "$XDG_MUSIC_DIR" ] && [ -f "$_xdguserdirs" ] && source "$_xdguserdirs"
_musicdir="${XDG_MUSIC_DIR:-$HOME/Music}"
_ptgdpmusicdir="$_musicdir/${PTGDP_MUSIC_DIR:-PTGDP Songs}"