X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall.functions;h=cb772fd32dabc2d64f781fc11a5a5ead32edb32b;hb=be83a167b00a5bc56a91c57f30875d52179e188c;hp=463dec3799a5d227692d43bf3ee9c3f8622d4137;hpb=4fbe76ca4e30a4515d2111a27d3067259f890355;p=dak.git diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 463dec37..cb772fd3 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -390,9 +390,17 @@ function mkchecksums() { function mirror() { log "Regenerating \"public\" mirror/ hardlink fun" - date -u > ${ftpdir}/project/trace/ftp-master.debian.org - echo "Using dak v1" >> ${ftpdir}/project/trace/ftp-master.debian.org - echo "Running on host: $(hostname -f)" >> ${ftpdir}/project/trace/ftp-master.debian.org + DATE_SERIAL=$(date +"%Y%m%d01") + FILESOAPLUS1=$(awk '/serial/ { print $3+1 }' ${TRACEFILE} ) + if [ "$DATE_SERIAL" -gt "$FILESOAPLUS1" ]; then + SERIAL="$DATE_SERIAL" + else + SERIAL="$FILESOAPLUS1" + fi + date -u > ${TRACEFILE} + echo "Using dak v1" >> ${TRACEFILE} + echo "Running on host: $(hostname -f)" >> ${TRACEFILE} + echo "Archive serial: ${SERIAL}" >> ${TRACEFILE} cd ${mirrordir} rsync -aH --link-dest ${ftpdir} --delete --delete-after --ignore-errors ${ftpdir}/. . }