]> git.decadent.org.uk Git - dak.git/commitdiff
Guard against non-existing tracefiles (eg. new archive)
authorJoerg Jaspert <joerg@debian.org>
Thu, 24 Dec 2015 22:13:56 +0000 (23:13 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 24 Dec 2015 22:13:56 +0000 (23:13 +0100)
config/debian/dinstall.functions

index b8a4b0eb44ccb998dbca0c6bab187cb8db3fcc31..a0c362c17f97475f8fc77f61523f675a13f7968d 100644 (file)
@@ -443,7 +443,7 @@ function mirror() {
 
         log "Regenerating \"public\" mirror/${archive} hardlink fun"
         DATE_SERIAL=$(date +"%Y%m%d01")
-        FILESOAPLUS1=$(awk '/serial/ { print $3+1 }' ${TRACEFILE} )
+        FILESOAPLUS1=$(awk '/serial/ { print $3+1 }' ${TRACEFILE} || echo ${DATE_SERIAL} )
         if [ "$DATE_SERIAL" -gt "$FILESOAPLUS1" ]; then
             SERIAL="$DATE_SERIAL"
         else