[Debian-in-commits] [debian-in] 01/03: Improved the script to pipe the output of apt-cache rdepends into dd-list and capable of accepting options --maintainers and --uploaders

Vasudev Kamath vasudev-guest at alioth.debian.org
Sat Sep 7 06:53:25 UTC 2013


This is an automated email from the git hooks/post-receive script.

vasudev-guest pushed a commit to branch master
in repository debian-in.

commit cfaf0f5ba381a05ccf4b9bcefced703211e2b618
Author: Vasudev Kamath <kamathvasudev at gmail.com>
Date:   Sat Sep 7 12:21:00 2013 +0530

    Improved the script to pipe the output of apt-cache rdepends into
    dd-list and capable of accepting options --maintainers and --uploaders
---
 attic/scripts/print-rdeps |   28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/attic/scripts/print-rdeps b/attic/scripts/print-rdeps
index 64f7b3c..6717bc6 100755
--- a/attic/scripts/print-rdeps
+++ b/attic/scripts/print-rdeps
@@ -1,12 +1,30 @@
 #!/bin/sh
 set -eu
 
-if [ $# -lt 1 ]; then
-    echo "Usage: $0 package[s]" >&2
-    exit 2
-fi
+while true; do
+    case "$1" in
+	--maintainers)
+	    option="--nouploaders";
+	    shift;
+	    break;
+	    ;;
+	--uploaders)
+	    option="--uploaders";
+	    shift;
+	    break;
+	    ;;
+	--*)
+	    echo "Unknown option $1" >&2
+	    exit 64
+	    ;;
+	*)
+	    echo "Usage: $0 --uploaders|--maintainers package[s]" >&2
+	    exit 2
+	    ;;
+    esac
+done
 
 for package in "$@"; do
     echo "----- $package -----"
-    apt-cache rdepends "$package"
+    apt-cache rdepends "$package" | sed -n 's/^\s//p' | xargs dd-list "$option"
 done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-in/debian-in.git



More information about the Debian-in-commits mailing list