diff options
author | Erich Eckner <git@eckner.net> | 2018-02-04 12:07:03 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-04 12:07:03 +0100 |
commit | 27106d9e0c70524a42cad4b2d662177c8490c174 (patch) | |
tree | fcdbeb070381ce571984d861ac73483c7b17e5b7 /bin/build-master-status | |
parent | c3279084e8f93a9f2f0488c3f78b72b8df3c65e4 (diff) | |
download | builder-27106d9e0c70524a42cad4b2d662177c8490c174.tar.xz |
bin/build-master-status: only add not-yet-existent todos newly to database
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-x | bin/build-master-status | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/build-master-status b/bin/build-master-status index ce49332..0e80bd6 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -584,7 +584,16 @@ if ${web}; then printf ';\n' printf 'INSERT IGNORE INTO `todos` (`file`,`line`,`description`) ' printf 'SELECT `td`.`file`,`td`.`line`,`td`.`description` ' - printf 'FROM `td`;\n' + printf 'FROM `td` ' + printf 'WHERE NOT EXISTS (' + printf 'SELECT * FROM `todos`' + printf ' AND `td`.`%s`=`todos`.`%s`' \ + 'file' 'file' \ + 'line' 'line' \ + 'description' 'description' | \ + sed 's/^ AND / WHERE /' + printf ');\n' + printf 'DELETE FROM `todos` WHERE NOT EXISTS (' printf 'SELECT * FROM `td`' printf ' AND `td`.`%s`=`todos`.`%s`' \ |