[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][deploy] 2 commits: Only rsync if the file got updated



Title: GitLab

Joerg Jaspert pushed to branch deploy at Debian FTP Team / dak

Commits:

1 changed file:

Changes:

  • scripts/debian/link_morgue.sh
    ... ... @@ -95,14 +95,17 @@ NOW=$(date -Is)
    95 95
     # hash from file" > somefile", then packs the file. To not stress the
    
    96 96
     # db host too much with that query, it only refreshes the file if its
    
    97 97
     # older than 24 hours.
    
    98
    -ssh ${DBHOST} preparehashes
    
    98
    +out=""
    
    99
    +out=$(ssh ${DBHOST} preparehashes)
    
    99 100
     
    
    100 101
     # And now we get us the file here, so we can easily lookup hashes.
    
    101 102
     # (the rsync uses the same ssh key and runs into the forced command.
    
    102 103
     # That just knows to send the file for rsync instead of preparing it.)
    
    103
    -cd "${dbdir}"
    
    104
    -rsync ${DBHOST}:/srv/ftp-master.debian.org/home/hashes.gz ${HASHFILE}.gz
    
    105
    -gunzip --keep --force ${HASHFILE}.gz
    
    104
    +if [[ ${out} == UPDATED ]]; then
    
    105
    +    cd "${dbdir}"
    
    106
    +    rsync ${DBHOST}:/srv/ftp-master.debian.org/home/hashes.gz ${HASHFILE}.gz
    
    107
    +    gunzip --keep --force ${HASHFILE}.gz
    
    108
    +fi
    
    106 109
     
    
    107 110
     cd "${PROCESSDIR}"
    
    108 111
     log "Processing ${PROCESSDIR}"
    


  • Reply to: