On Tue, 2 Jul 2024 13:21:30 +0200
DutchDaemon - FreeBSD Forums Administrator <dutchdae...@freebsd.org>
wrote:

> On 2-7-2024 00:52, Tomoaki AOKI wrote:
> > Script below would work for you.
> > for port in $( /usr/local/sbin/pkg prime-origins | sort -u )
> > do
> > flavor=$( /usr/local/sbin/pkg info -A "${port}" | \
> > /usr/bin/grep "flavor" | /usr/bin/awk '{print $NF}' | \
> > /usr/bin/grep -v "default" )
> > [ "x${flavor}" = "x" ] && echo "${port}" || \
> >    for flvr in ${flavor}
> >    do
> >      echo -n ${flvr} ; [ "x${flvr}" = "x" ] && echo "${port}" || \
> >      echo "${port}@${flvr}"
> >    done
> > done
> 
> 
> I don't think I have anything multi-flavored anywhere, but good catch. 
> Thanks!

Ah, sorry! Forgot to remove debug echo.

echo -n ${flvr} ; [ "x${flvr}" = "x" ] && echo "${port}" || \

should be as below.

[ "x${flvr}" = "x" ] && echo "${port}" || \


-- 
Tomoaki AOKI    <junch...@dec.sakura.ne.jp>

Reply via email to