task: Ensure necessary files exist on start

There are some includes in taskwarrior which make the program error out
if they don't exist on start. This little hook ensures that they get
created each time a new environment is created.
This commit is contained in:
Marty Oehme 2022-12-08 10:45:24 +01:00
parent 03684ce29f
commit dbcc18cc56
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9

View file

@ -0,0 +1,6 @@
#!/usr/bin/env sh
# Ensure necessary taskwarrior includes exist
[ -e "${XDG_CONFIG_HOME:-$HOME/.config}/task/contexts" ] || touch "${XDG_CONFIG_HOME:-$HOME/.config}/task/contexts"
[ -e "${XDG_CONFIG_HOME:-$HOME/.config}/task/task-sync.rc" ] || touch "${XDG_CONFIG_HOME:-$HOME/.config}/task/task-sync.rc"