summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-05-11 11:46:17 +0200
committerHolger Levsen <holger@layer-acht.org>2015-05-11 11:46:17 +0200
commit1b1feadd4ab909f545a513351b6a7197baa797a3 (patch)
tree6c4787fc414833cdd38b4a17b77a866dda714fcd /bin
parentaf2049a224281b44980113cf6d5d3bd4709b6e75 (diff)
downloadjenkins.debian.net-1b1feadd4ab909f545a513351b6a7197baa797a3.tar.xz
reproducible: create target if it doesnt exist
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_create_meta_pkg_sets.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh
index e972d11b..3ab64967 100755
--- a/bin/reproducible_create_meta_pkg_sets.sh
+++ b/bin/reproducible_create_meta_pkg_sets.sh
@@ -41,6 +41,12 @@ convert_from_deb822_into_source_packages_only() {
> ${TMPFILE2} < $TMPFILE
sort -u ${TMPFILE2} > $TMPFILE
}
+
+update_target() {
+ mv $TMPFILE $TARGET
+ echo "$(date) - $TARGET updated."
+}
+
update_if_similar() {
# this is mostly done to not accidently overwrite the lists
# with garbage, eg. when external services are down
@@ -59,9 +65,11 @@ update_if_similar() {
echo "Warning: too much difference for $TARGET, aborting. Please investigate and update manually."
rm $TARGET.new
else
- mv $TMPFILE $TARGET
- echo "$(date) - $TARGET updated."
+ update_target
fi
+ else
+ # target does not exist, create it
+ update_target
fi
else
echo "$(date) - $TARGET not updated, $TMPFILE is empty."