Better cache dir initialization in script
1 files changed, 8 insertions(+), 0 deletions(-)

M synctodo
M synctodo +8 -0
@@ 10,6 10,14 @@ 
 # - zsh, because it's the best shell
 
 STTDIR=$XDG_CACHE_HOME/synctodo
+if [[ -z $XDG_CACHE_HOME ]]; then
+	if [[ -d ${HOME}/.cache ]]; then
+		STTDIR=${HOME}/.cache/synctodo
+	else
+		STTDIR=${HOME}/.synctodo
+	fi
+fi
+test \! -d "$STTDIR" && mkdir -p "$STTDIR"
 
 # There really should be standards for crap like this
 if [[ -n $(command -v mktemp) ]]; then