From d6df7ae483b984b90bdc8d4540301ef394885a98 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 3 Jul 2018 22:22:49 +0200 Subject: Reaktor taskwarrior: touch if no taskrc exists --- krebs/5pkgs/simple/Reaktor/plugins.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index cd389366e..7573c9256 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -143,9 +143,15 @@ rec { taskwarrior = buildSimpleReaktorPlugin "task" { pattern = "^task: (?P.*)$$"; - script = pkgs.writeDash "task-wrapper" '' - ${pkgs.taskwarrior}/bin/task "$*" - ''; + script = let + taskrc = "$HOME/.taskrc"; + in + pkgs.writeDash "task-wrapper" '' + if [ -f ${taskrc} ] ; then + touch ${taskrc} + fi + ${pkgs.taskwarrior}/bin/task "$*" + ''; }; todo = name: { -- cgit v1.2.3