diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-12-23 02:11:02 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-12-23 02:11:02 +0100 |
commit | ab50e6f10b0f9b7fb36604ca6e58accfd674e570 (patch) | |
tree | e189036e72f3fdaa9ed61b723ff39fb964dc0347 | |
parent | c998f6d5298264431f04041a868b57070c90e7c2 (diff) | |
download | jenkins.debian.net-ab50e6f10b0f9b7fb36604ca6e58accfd674e570.tar.xz |
reproducible Debian: better deal with non-existing stamp files
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-x | bin/reproducible_setup_pbuilder.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh index ec5c7836..88ac2433 100755 --- a/bin/reproducible_setup_pbuilder.sh +++ b/bin/reproducible_setup_pbuilder.sh @@ -134,9 +134,11 @@ setup_pbuilder() { BASETGZ=/var/cache/pbuilder/$SUITE-reproducible-base.tgz STAMP=/var/log/jenkins/$SUITE-reproducible-base.tgz.stamp -if [ -f "$STAMP" -a $(stat -c %Y "$STAMP") -gt $(date +%s) ]; then - echo "stamp file has a timestamp from the future." - exit 1 +if [ -f "$STAMP" ] ; then + if [ -f "$STAMP" -a $(stat -c %Y "$STAMP") -gt $(date +%s) ]; then + echo "stamp file has a timestamp from the future." + exit 1 + fi fi OLDSTAMP=$(find $STAMP -mtime +1 -exec ls -lad {} \; || echo "nostamp") |