summaryrefslogtreecommitdiffstats
path: root/get-new-dependencies.sh
blob: f15c48aa7ae7cd7590cdf1efbd304179536a6836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

if (($#<2)); then
	echo "usage: ${0##*/} <base package> <new dependency>"
	exit 1
fi

pkg=$1
new_dep=$2

additional_pkgs=($(comm -13 <(pactree -sl "$pkg" | sort -u) <(pactree -sl "$new_dep" | sort -u)))

expac -SH M "%n - %m" "${additional_pkgs[@]}"