From 833e7efd1988458366075c0c41ab599a037f1e4f Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Wed, 3 Aug 2022 09:16:40 -0400 Subject: [PATCH] FIX make log file if it does not yet exist --- dot_config/zsh/dot_zprofile.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dot_config/zsh/dot_zprofile.tmpl b/dot_config/zsh/dot_zprofile.tmpl index 94092cd..8a750e1 100644 --- a/dot_config/zsh/dot_zprofile.tmpl +++ b/dot_config/zsh/dot_zprofile.tmpl @@ -1,6 +1,8 @@ {{ if .desktop -}} initfile="$XDG_CONFIG_HOME/X11/xinitrc" -logfile="$XDG_DATA_HOME/X11/xinit.log" +logdir="$XDG_DATA_HOME/X11" +logfile="$logdir/xinit.log" +mkdir -p "$logdir" [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && \ exec startx "$initfile" -- -keeptty > "$logfile" 2>&1 {{- end }}