From 4792c4d6a600d2a50d20a02893095a0d17ef8b38 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 12 Oct 2014 18:00:52 +0200 Subject: reproducible: refactor --- bin/reproducible_build.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index d95bf4c0..1f5a357d 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -37,13 +37,11 @@ update_sources_table() { if [ "$BET" = "" ] ; then BET=$VERSION continue - elif dpkg --compare-versions "$BET" gt "$VERSION" ; then - sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM sources WHERE name = '$PKG' AND version = '$VERSION'" - else - sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM sources WHERE name = '$PKG' AND version = '$BET'" - BET=$VERSION + elif dpkg --compare-versions "$BET" lt "$VERSION" ; then + BET=$VERSION fi done + sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM sources WHERE name = '$PKG' AND version != '$BET'" done echo "$(date) Done removing duplicate versions from sources db..." # update amount of available packages (for doing statistics later) -- cgit v1.2.3-70-g09d2