]> git.donarmstrong.com Git - wannabuild.git/blobdiff - trigger.daily
introduce libtrigger.sh and put the architectures into it
[wannabuild.git] / trigger.daily
index 48d10afb97abec698665987d95f4774e0b72cf84..73b17768113ac50dadb6c39620e6791de38bcc73 100755 (executable)
@@ -14,45 +14,16 @@ PATH="/bin:/usr/bin"
 DISTS="stable-security testing-security stable testing unstable"
 STATS_DISTS="unstable testing stable"
 SECTIONS="main contrib non-free"
-ARCHS_oldstable="m68k arm sparc alpha powerpc i386 mips mipsel ia64 hppa s390"
-ARCHS_stable="arm sparc alpha powerpc i386 amd64 mips mipsel ia64 hppa s390"
-ARCHS_testing="$ARCHS_stable armel"
-ARCHS_unstable="$ARCHS_testing"
 TMPDIR="/org/wanna-build/tmp"
+LIBTRIGGER="/org/wanna-build/libtrigger.sh"
 LOCKFILE="/org/wanna-build/tmp/DB_Maintenance_In_Progress"
 MASTER="http://incoming.debian.org/debian/dists"
 MASTERBUILDD="http://incoming.debian.org/buildd"
 SECMASTER="http://security-master.debian.org/debian-security/dists"
 SECMASTERBUILDD=http://security-master.debian.org/buildd
-CURLOPT="-q -s -S -R -f -Y 10 -y 120 -K /srv/wanna-build/trigger.curlrc"
 NEWARCH=""
 
-curl_index () {
-    local url tmpname destname appendname curlopt
-    url="$1"
-    destname="$2"
-    appendname="$3"
-    tmpname=".$destname"
-    rc=0
-    rm -f "$tmpname"
-    if [ -e "$destname" ]; then
-       refdate=`perl -e "print scalar gmtime(((stat ('$destname'))[9]))"`
-        curl $CURLOPT -z "$refdate" "$url" -o "$tmpname"
-        rc=$?
-    else
-       curl $CURLOPT "$url" -o "$tmpname"
-       rc=$?
-    fi
-    if [ $rc -eq 0 -a -e "$tmpname" ]; then
-       if gzip -t "$tmpname"; then
-           mv "$tmpname" "$destname"
-       else
-           rc=$?
-       fi
-    fi
-    gzip -dc "$destname" >> "$appendname"
-    return $rc
-}
+. "$LIBTRIGGER"
 
 DAY=`date +%w`