diff options
author | Erich Eckner <git@eckner.net> | 2018-02-04 13:40:19 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-04 13:40:19 +0100 |
commit | 9ef68dd176d10bebf92cd937f8b6115a9d40b0bf (patch) | |
tree | 4d7241f4b4183b84528ee5e34b5890412ae714e4 /bin | |
parent | 27106d9e0c70524a42cad4b2d662177c8490c174 (diff) | |
download | builder-9ef68dd176d10bebf92cd937f8b6115a9d40b0bf.tar.xz |
bin/build-master-status: be more flexible when creating the temporary todos-table
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build-master-status | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/build-master-status b/bin/build-master-status index 0e80bd6..d74ff8a 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -561,13 +561,13 @@ if ${web}; then # insert unfound todos # shellcheck disable=SC2016 { - printf 'CREATE TEMPORARY TABLE `td` (' - printf '`file` VARCHAR(64), ' - printf '`line` MEDIUMINT, ' - printf '`description` VARCHAR(128), ' - printf 'UNIQUE KEY `position` (`file`,`line`), ' - printf 'UNIQUE KEY `content` (`file`,`description`)' - printf ');' + printf 'SHOW CREATE TABLE `todos`' | \ + ${mysql_command} --raw --batch | \ + sed ' + 1d + 2s/^\S\+\s\+CREATE TABLE `todos` /CREATE TEMPORARY TABLE `td` / + ' + printf ';\n' printf 'INSERT INTO `td` (`file`,`line`,`description`) VALUES ' while read -r file line desc; do printf '(' |