r2405 - packages/tarballs

Gonéri Le Bouder goneri-guest at alioth.debian.org
Tue Feb 13 17:18:17 CET 2007


Author: goneri-guest
Date: 2007-02-13 17:18:17 +0100 (Tue, 13 Feb 2007)
New Revision: 2405

Modified:
   packages/tarballs/getsources.sh
Log:
add support for Alioth http space.


Modified: packages/tarballs/getsources.sh
===================================================================
--- packages/tarballs/getsources.sh	2007-02-13 14:11:51 UTC (rev 2404)
+++ packages/tarballs/getsources.sh	2007-02-13 16:18:17 UTC (rev 2405)
@@ -1,27 +1,44 @@
 #!/bin/sh
+# Download package sources that are already in the archive. You probably do
+# not need this script, but I do -- sam 07/02/13.
 
-set -e
+#set -e
 
 cd "$(dirname $0)"
+DEBIANMIRROR="ftp.fr.debian.org"
 
-# Download package sources that are already in the archive. You probably do
-# not need this script, but I do -- sam 07/02/13.
+#SOURCES=$(find ../trunk -wholename '*debian/control' -exec sed -ne 's/Source: //p' '{}' ';' | sort | uniq)
+SOURCES=$(find ../trunk -regex '.*debian\/control' -exec sed -ne 's/Source: //p' '{}' ';' | sort | uniq)
 
-SOURCES=$(find ../trunk -wholename '*debian/control' -exec sed -ne 's/Source: //p' '{}' ';' | sort | uniq)
-
 for x in ${SOURCES}; do
   echo -n "$x: "
   CACHE="$(apt-cache showsrc $x)"
   DIR="$(echo "$CACHE" | sed -ne 's/Directory: //p' | head -n 1)"
-  TARBALL="$(echo "$CACHE" | sed -ne 's/.* \(.*[.]tar[.]gz\)/\1/p'| head -n 1)"
-  if [ -z "$DIR" -o -z "$TARBALL" ]; then
-    echo "no source found"
-  elif [ -f "$TARBALL" ]; then
-    echo "$TARBALL already here"
+  SVNRELEASE="$(cat ../trunk/$x/debian/changelog | head -n 1 | sed 's/.*(\(.*\)).*/\1/' | sed 's/-.*//')"
+  #TARBALL="$(echo "$CACHE" | sed -ne 's/.* \(.*[.]tar[.]gz\)/\1/p'| head -n 1)"
+  if [ "$SVNRELEASE" = "" ]; then
+      echo "can't read current release from changelog"
   else
-    echo "downloading $TARBALL"
-    wget -qc http://ftp.fr.debian.org/debian/$DIR/$TARBALL -O $TARBALL.part
-    mv $TARBALL.part $TARBALL
+    TARBALL=$x"_"$SVNRELEASE".orig.tar.gz"
+    if [ -s "$TARBALL" ]; then
+      echo "$TARBALL already here"
+    elif [ -n "$DIR" -o -n "$TARBALL" ]; then
+      wget -qc http://$DEBIANMIRROR/debian/$DIR/$TARBALL -O $TARBALL.part
+      if [ -s "$TARBALL.part" ]; then
+        echo " $TARBALL downloaded from $DEBIANMIRROR"
+        mv $TARBALL.part $TARBALL
+      fi
+    fi
+    if [ ! -s "$TARBALL" ]; then
+      wget -qc "http://pkg-games.alioth.debian.org/tarballs/$TARBALL" -O $TARBALL.part
+    if [ -s "$TARBALL.part" ]; then
+      echo " $TARBALL downloaded from Alioth"
+      mv $TARBALL.part $TARBALL
+    fi
   fi
+  if [ ! -s "$TARBALL" ]; then
+      echo "no source found"
+  fi
+fi
 done
 




More information about the Pkg-games-commits mailing list