From dbcc18cc5611c1d0cc98e755b67dbb61afac150c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 8 Dec 2022 10:45:24 +0100 Subject: [PATCH] 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. --- taskwarrior/.config/sh/env.d/taskwarrior-ensure-files.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 taskwarrior/.config/sh/env.d/taskwarrior-ensure-files.sh diff --git a/taskwarrior/.config/sh/env.d/taskwarrior-ensure-files.sh b/taskwarrior/.config/sh/env.d/taskwarrior-ensure-files.sh new file mode 100644 index 0000000..1562533 --- /dev/null +++ b/taskwarrior/.config/sh/env.d/taskwarrior-ensure-files.sh @@ -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"