]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
correctly import all relevant profitbricks repos
authorHolger Levsen <holger@layer-acht.org>
Fri, 28 Sep 2012 20:12:26 +0000 (22:12 +0200)
committerHolger Levsen <holger@layer-acht.org>
Fri, 28 Sep 2012 20:12:26 +0000 (22:12 +0200)
debian_packages2db.py
debian_repos2db.sh

index 225a915aa25bd944abafb8506b83abe0f9ec335d..f8daddebba4636cd0de5c315f2c46dc1bd4cb85f 100755 (executable)
@@ -24,7 +24,6 @@ if __name__ == '__main__':
 
     tmp = tempfile.NamedTemporaryFile(delete=False)
     cmd = ['egrep', '(^Package:|^Version:)', packages_file]
-    print cmd
     egrep =  subprocess.Popen(
             cmd,
             stdout=tmp,
index 401bec7065987652f2c5324af37c8c6d208d1aa4..fd266678761af338f800d31fed57d465c1a4722b 100755 (executable)
@@ -1,26 +1,30 @@
 #!/bin/bash
 
+
 REPO_SUITES[0]="squeeze profitbricks-backports profitbricks-backports-proposed-updates profitbricks-backports-pre-staging"
 REPO_SECTIONS[0]="main contrib non-free"
 REPO_BASE_URL[0]="http://alexandria/debian-mirror/dists/SUITE/SECTION/binary-amd64/"
 
 REPO_SUITES[1]="production-approved-updates production-proposed-updates production pre-staging"
-REPO_SECTION[1]="main contrib non-free"
+REPO_SECTIONS[1]="main contrib non-free"
 REPO_BASE_URL[1]="http://alexandria/profitbricks-repository/dists/SUITE/SECTION/binary-amd64/"
 
 REPO_SUITES[2]="pool"
-REPO_SECTION[2]="main non-free"
-REPO_BASE_URL[2]="http://alexandria.profitbricks.localdomain/profitbricks-repository/SUITE/SECTION/"
+REPO_SECTIONS[2]="main non-free"
+REPO_BASE_URL[2]="http://alexandria/profitbricks-repository/SUITE/SECTION/"
+
+REPOS=2
 
-for RUN in 0 1 ; do
-       if [ "$RUN" == 0 ] ; then 
+for REPO in $(seq 0 $REPOS) ; do
+       if [ "$REPO" == 0 ] ; then
                ORIGIN=debian
        else
                ORIGIN=profitbricks
        fi
-       for SUITE in ${REPO_SUITES[$RUN]} ; do
-               for SECTION in ${REPO_SECTIONS[$RUN]} ; do
-                       URL=$(echo ${REPO_BASE_URL[$RUN]} | sed -s "s#SUITE#$SUITE#" | sed -s "s#SECTION#$SECTION#")/Packages
+       for SUITE in ${REPO_SUITES[$REPO]} ; do
+               for SECTION in ${REPO_SECTIONS[$REPO]} ; do
+                       URL=$(echo ${REPO_BASE_URL[$REPO]} | sed -s "s#SUITE#$SUITE#" | sed -s "s#SECTION#$SECTION#")/Packages
+                       echo $URL
                        wget  $URL -o /dev/null
                        [ -s Packages ] && ./debian_packages2db.py Packages $ORIGIN
                        rm Packages