~philroche/ubuntu-on-ec2/ec2-publishing-scripts-force-querydata

« back to all changes in this revision

Viewing changes to publicize-build

  • Committer: Daniel Watkins
  • Date: 2016-10-14 15:59:24 UTC
  • mfrom: (648.1.1 ec2-publishing-scripts)
  • Revision ID: daniel.watkins@canonical.com-20161014155924-2qans3cm7366kfc1
[r=rcj] Use download query data to generate .latest.txt files

Show diffs side-by-side

added added

removed removed

Lines of Context:
396
396
for r in daily released; do
397
397
        newer=""
398
398
        latest="${info_dir}/${r}.latest.txt"
399
 
        for f in "${info_dir}"/*/*/${r}.current.txt; do
 
399
        for f in "${info_dir}"/*/*/${r}-dl.current.txt; do
400
400
                [ -f "${f}" ] && [ ! -f "${latest}" -o "$f" -nt "${latest}" ] &&
401
401
                        { newer=${f}; break; }
402
402
        done
405
405
        awk '-F\t' 'FNR == 1 && NR != 1 { print prev; }
406
406
             { prev = sprintf("%s\t%s\t%s\t%s",$1,$2,$3,$4); }
407
407
             END { print prev ; } ' \
408
 
             "${info_dir}"/*/*/${r}.current.txt > "${latest}" ||
 
408
             "${info_dir}"/*/*/${r}-dl.current.txt > "${latest}" ||
409
409
                fail "failed to update ${latest}"
410
410
        error "updated ${latest}"
411
411
done