summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-07-03 22:22:49 +0200
committerjeschli <jeschli@gmail.com>2018-07-03 22:22:49 +0200
commitd6df7ae483b984b90bdc8d4540301ef394885a98 (patch)
treeeec0e7920f86793cb21feb001cb6dc6b64e18050
parent70e8c4b0a4255a989bf93fe6fca96244ee617eee (diff)
Reaktor taskwarrior: touch if no taskrc exists
-rw-r--r--krebs/5pkgs/simple/Reaktor/plugins.nix12
1 files changed, 9 insertions, 3 deletions
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<args>.*)$$";
- 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: {