diff options
author | Erich Eckner <git@eckner.net> | 2020-05-05 21:09:59 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-05-05 21:09:59 +0200 |
commit | a928303d0689cf64a71c639770c2f8c34c6a84f9 (patch) | |
tree | 05caff08784ab7e9d399a096e995272b98e255fe | |
parent | bf8b049e7feb61d12fe1e940e1e845de646b335e (diff) | |
download | builder-a928303d0689cf64a71c639770c2f8c34c6a84f9.tar.xz |
bin/seed-build-list: fix bug, when -a, but no -s given
-rwxr-xr-x | bin/seed-build-list | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/bin/seed-build-list b/bin/seed-build-list index 5adf46e..3303416 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -387,15 +387,18 @@ fi printf 'INSERT INTO `relevant_archs`(`id`)' printf ' SELECT `architectures`.`id`' printf ' FROM `architectures`' - printf ' WHERE `architectures`.`name` NOT IN (' - base64_encode_each \ - <"${tmp_dir}/skip-archs" \ - | sed ' - s/^.*$/from_base64("\0")/ - $! s/$/,/ - ' \ - | tr -d '\n' - printf ');\n' + if [ -s "${tmp_dir}/skip-archs" ]; then + printf ' WHERE `architectures`.`name` NOT IN (' + base64_encode_each \ + <"${tmp_dir}/skip-archs" \ + | sed ' + s/^.*$/from_base64("\0")/ + $! s/$/,/ + ' \ + | tr -d '\n' + printf ')' + fi + printf ';\n' # schedule any package, that: # 1) is not on the build-list currently and |