Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/nit-picker
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-10-17 15:00:24 +0200
committerErich Eckner <git@eckner.net>2019-10-17 15:00:24 +0200
commit7a4bb95433fa40ca482a42438840341f13a6c3e9 (patch)
tree97bcde76e071fa0a69775f885e45d04ffb820481 /bin/nit-picker
parent7f394abdd22aac80028f08ab37635201727559ad (diff)
bin/nit-picker: do not fail if remove-those-dependencies exists, but matches no dependencies
Diffstat (limited to 'bin/nit-picker')
-rwxr-xr-xbin/nit-picker13
1 files changed, 5 insertions, 8 deletions
diff --git a/bin/nit-picker b/bin/nit-picker
index 7312348..7d7da06 100755
--- a/bin/nit-picker
+++ b/bin/nit-picker
@@ -481,14 +481,11 @@ done
printf ';\n'
} \
| mysql_run_query \
- | {
- printf 'DELETE `dependencies`'
- printf ' FROM `dependencies`'
- printf ' WHERE `dependencies`.`id` IN ('
- sed '$! s/$/,/' \
- | tr -d '\n'
- printf ');\n'
- }
+ | sed '
+ 1 i DELETE `dependencies` FROM `dependencies` WHERE `dependencies`.`id` IN (
+ $! s/$/,/
+ $ a );
+ '
fi
# shellcheck disable=SC2016
if [ -s "${tmp_dir}/add-those-dependencies" ]; then