r4557 - packages/tarballs

Gonéri Le Bouder goneri-guest at alioth.debian.org
Mon Nov 5 20:17:06 UTC 2007


Author: goneri-guest
Date: 2007-11-05 20:17:06 +0000 (Mon, 05 Nov 2007)
New Revision: 4557

Modified:
   packages/tarballs/getsources.sh
Log:
now we can have the package name as parameter


Modified: packages/tarballs/getsources.sh
===================================================================
--- packages/tarballs/getsources.sh	2007-11-05 20:13:25 UTC (rev 4556)
+++ packages/tarballs/getsources.sh	2007-11-05 20:17:06 UTC (rev 4557)
@@ -1,14 +1,30 @@
 #!/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.
+# Download package sources that are already in the archive. You probably
+# need this script :)
+# usage:
+# To get all the tarball:
+#  ./getsources.sh
+#
+# To get just the tarball of packagename:
+# ./getsources.sh packagename
 
+
 #set -e
 
 cd "$(dirname $0)"
 [ -z "$DEBIANMIRROR" ] && DEBIANMIRROR=$(grep -E '^deb\ (ht|f)tp' /etc/apt/sources.list| head -n 1 | sed 's;^deb.*p://\([^/]*\)/debian.*;\1;')
 
-SOURCES=$(find ../trunk ../../non-free/packages/trunk/ -regex '.*debian\/control' -exec sed -ne 's/Source: //p' '{}' ';' | sort | uniq)
+if [ -z $* ]; then
+    TRUNK="../trunk ../../non-free/packages/trunk/"
+else
+    for pkg in $*; do
+        [ -d ../trunk/$pkg ] && TRUNK="$TRUNK ../trunk/$pkg"
+        [ -d ../../non-free/packages/trunk/$pkg ] && TRUNK="$TRUNK ../../non-free/packages/trunk/$pkg"
+    done
+fi
+SOURCES=$(find $TRUNK -regex '.*debian\/control' -exec sed -ne 's/Source: //p' '{}' ';' | sort | uniq)
 
+
 for x in ${SOURCES}; do
   echo -n "$x: "
   CACHE="$(apt-cache showsrc $x)"




More information about the Pkg-games-commits mailing list