k 3 urlwatch: add verbose flag

This commit is contained in:
makefu 2015-10-26 00:04:15 +01:00
parent cb1b101dfa
commit 526adba3c8

View File

@ -56,6 +56,13 @@ let
https://nixos.org/channels/nixos-unstable/git-revision https://nixos.org/channels/nixos-unstable/git-revision
]; ];
}; };
verbose = mkOption {
type = types.bool;
default = false;
description = ''
verbose output of urlwatch
'';
};
}; };
urlsFile = toFile "urls" (concatStringsSep "\n" cfg.urls); urlsFile = toFile "urls" (concatStringsSep "\n" cfg.urls);
@ -106,7 +113,7 @@ let
cd /tmp cd /tmp
urlwatch -e --urls="$urlsFile" > changes 2>&1 || : urlwatch -e ${optionalString cfg.verbose "-v"} --urls="$urlsFile" > changes || :
if test -s changes; then if test -s changes; then
date=$(date -R) date=$(date -R)