mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-14 00:21:08 +00:00
Improvements to reverse-build-depends.
This commit is contained in:
parent
d6ba86bf51
commit
fc04d1c7e9
@ -7,7 +7,10 @@
|
||||
# that a package has.
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-c] <package name>"
|
||||
echo "Usage: $0 [-c|-s] <package name>"
|
||||
echo "Options:"
|
||||
echo " -c: Print only the number of reverse dependencies."
|
||||
echo " -s: Print all reverse dependencies in a single line."
|
||||
}
|
||||
|
||||
if [ "$1" = '-c' ]
|
||||
@ -16,6 +19,12 @@ then
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ "$1" = '-s' ]
|
||||
then
|
||||
single_line=1
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ $# -ne 1 ];
|
||||
then
|
||||
usage
|
||||
@ -32,9 +41,14 @@ result=$(
|
||||
grep-dctrl -sPackage -F Build-Depends,Build-Depends-Indep $1 \
|
||||
/var/lib/apt/lists/*Sources | cut -d ' ' -f 2)
|
||||
|
||||
if [ -z $count ]
|
||||
if [ -z $count ] && [ -z $single_line ]
|
||||
then
|
||||
echo $result
|
||||
echo "$result"
|
||||
else
|
||||
echo $result | wc -w
|
||||
if [ -z $count ]
|
||||
then
|
||||
echo $result
|
||||
else
|
||||
echo "$result" | wc -l
|
||||
fi
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user