Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-master-status
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-xbin/build-master-status28
1 files changed, 17 insertions, 11 deletions
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'
} | \