index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-01-17 15:24:40 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-01-17 15:24:40 +0100 |
commit | c9f55c95cb382e22c41a310c1005e3de43379ae9 (patch) | |
tree | 38210b816af5645dad7fad10b1de6a32fe89c76b /bin/build-master-status | |
parent | 294c66ccc56ee6200b288585833cae1d1bfc3ea8 (diff) |
-rwxr-xr-x | bin/build-master-status | 28 |
diff --git a/bin/build-master-status b/bin/build-master-status index 3605a02..cb18280 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -62,7 +62,8 @@ if [ -s "${tmp_dir}/todos" ]; then done printf 'UPDATE `todos`' - printf ' JOIN `td` ON `todos`.`id`=`td`.`id`' + printf ' JOIN `td`' + printf ' ON `todos`.`id`=`td`.`id`' printf ',`todos`.`%s`=`td`.`%s`' \ 'file' 'file' \ 'line' 'line' \ @@ -75,20 +76,25 @@ if [ -s "${tmp_dir}/todos" ]; then printf ' FROM `td`' printf ' WHERE `td`.`id` IS NULL;\n' - printf 'DELETE FROM `todos` WHERE NOT EXISTS (' - printf 'SELECT 1 FROM `td`' - printf ' AND `td`.`%s`=`todos`.`%s`' \ - 'file' 'file' \ - 'line' 'line' \ - 'description' 'description' | \ - sed 's/^ AND / WHERE /' + printf 'DELETE FROM `todos`' + printf ' WHERE NOT EXISTS (' + printf 'SELECT 1' + printf ' FROM `td`' + printf ' AND `td`.`%s`=`todos`.`%s`' \ + 'file' 'file' \ + 'line' 'line' \ + 'description' 'description' | \ + sed 's/^ AND / WHERE /' printf ');\n' printf 'DROP TEMPORARY TABLE `td`;\n' - printf 'DELETE FROM `todo_links` WHERE NOT EXISTS (' - printf 'SELECT 1 FROM `todos` ' + printf 'DELETE FROM `todo_links`' + printf ' WHERE NOT EXISTS (' + printf 'SELECT 1' + printf ' FROM `todos` ' printf 'WHERE `todos`.`id`=`todo_links`.`depending_on`' printf ') OR NOT EXISTS (' - printf 'SELECT 1 FROM `todos` ' + printf 'SELECT 1' + printf ' FROM `todos` ' printf 'WHERE `todos`.`id`=`todo_links`.`dependent`' printf ');\n' } | \ |