nsbin/archlinux-all-depending-packages.sh
Nico Schottelius df2daf524d init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
2017-07-19 17:15:41 +02:00

21 lines
325 B
Bash
Executable file

#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "$0 package" >&2
exit 1
fi
deps=$(pacman -Qi "$1" | awk -F: '/Depends On/ { print $2 }')
echo $1 -- $deps
alldeps=""
for dep in $deps; do
[ "$dep" = "None" ] && continue
pkg=$(echo $dep | sed 's/>=.*//')
alldeps="$alldeps $("$0" "$pkg")"
done
echo "$alldeps"