/[qa]/trunk/pts/www/bin/update_incoming.sh
ViewVC logotype

Diff of /trunk/pts/www/bin/update_incoming.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2046 by zack, Fri Nov 28 12:05:16 2008 UTC revision 2047 by zack, Fri Nov 28 12:22:04 2008 UTC
# Line 37  nice_wget() { Line 37  nice_wget() {
37      # the link)      # the link)
38      cp -a $2 $2.new || true      cp -a $2 $2.new || true
39      # Beware that -N conflicts with -O (#88176, #202911)      # Beware that -N conflicts with -O (#88176, #202911)
40      if wget -U pts -q -O $2.new $1 ; then      if wget -U pts -q -O $2.new "$1" ; then
41          mv $2.new $2          mv $2.new $2
42      else      else
43          echo "Downloading $1 failed, $2 is stale now"          echo "Downloading $1 failed, $2 is stale now"
# Line 45  nice_wget() { Line 45  nice_wget() {
45      fi      fi
46  }  }
47    
48    http_head() {
49        # $1: url
50        # return 0 if the URL exists (HEAD was OK), non-0 otherwise
51        curl --head --fail --silent "$1" > /dev/null
52        return $?
53    }
54    
55  nice_redirect_to() {  nice_redirect_to() {
56    # $1 : target file    # $1 : target file
57    # $2-... : shell command    # $2-... : shell command
# Line 113  mv sources.map.new sources.map Line 120  mv sources.map.new sources.map
120  nice_redirect_to bugs.help.txt $root/bin/tagged_bugs.py "help"  nice_redirect_to bugs.help.txt $root/bin/tagged_bugs.py "help"
121  nice_redirect_to bugs.gift.txt \  nice_redirect_to bugs.gift.txt \
122    $root/bin/tagged_bugs.py "gift" "debian-qa@lists.debian.org"    $root/bin/tagged_bugs.py "gift" "debian-qa@lists.debian.org"
123    piuparts_url="http://piuparts.debian.org/results-per-source.txt"
124    # extra care because $piuparts_url doesn't work yet
125    if http_head $piuparts_url ; then
126      nice_wget $piuparts_url piuparts.txt
127    else
128      test -f piuparts.txt || touch piuparts.txt
129    fi
130    
131  # Download debcheck lists  # Download debcheck lists
132  DCROOT=http://qa.debian.org/data/debcheck/result  DCROOT=http://qa.debian.org/data/debcheck/result

Legend:
Removed from v.2046  
changed lines
  Added in v.2047

  ViewVC Help
Powered by ViewVC 1.1.5