Reaktor plugins wiki-todo: fix flag injection

found by makefu
This commit is contained in:
lassulus 2017-09-01 22:15:51 +02:00
parent 78ea2c5b1a
commit 877edfa122

View File

@ -131,14 +131,14 @@ rec {
wiki-todo-add = buildSimpleReaktorPlugin "wiki-todo-add" {
pattern = "^wiki-todo: (?P<args>.*)$$";
script = pkgs.writeDash "wiki-todo-add" ''
echo "$@" >> wiki-todo
echo "$*" >> wiki-todo
echo "added todo"
'';
};
wiki-todo-done = buildSimpleReaktorPlugin "wiki-todo-done" {
pattern = "^wiki-todo-done: (?P<args>.*)$$";
script = pkgs.writeDash "wiki-todo-done" ''
${pkgs.gnugrep}/bin/grep -vFx "$@" wiki-todo > wiki-todo.tmp
${pkgs.gnugrep}/bin/grep -Fvxe "$*" wiki-todo > wiki-todo.tmp
${pkgs.coreutils}/bin/mv wiki-todo.tmp wiki-todo
'';
};