summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates14
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 465f896..abd380e 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -135,8 +135,20 @@ delete_package() {
}
# create tmp_dir and trap
+clean_up() {
+ rm -rf --one-file-system "${tmp_dir}"
+ # shellcheck disable=SC2016
+ {
+ printf 'DELETE FROM `binary_packages`'
+ printf ' WHERE `binary_packages`.`repository`=('
+ printf 'SELECT `repositories`.`id` FROM `repositories`'
+ printf ' WHERE `repositories`.`name`="to-be-decided"'
+ printf ');\n'
+ } | \
+ ${mysql_command}
+}
tmp_dir=$(mktemp -d 'tmp.get-package-updates.XXXXXXXXXX' --tmpdir)
-trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
+trap 'clean_up' EXIT
# Update git repositories (official packages, community packages and the repository of package customizations).