Re: sh: getting <category>/<portname> from pwd
- In reply to: Robert Clausecker : "Re: sh: getting <category>/<portname> from pwd"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Oct 2022 23:05:46 UTC
Hi, Try `make -VPKGORIGIN` > Perfect! Thanks > > > Am Tue, Oct 25, 2022 at 11:14:42PM +0100 schrieb Nuno Teixeira: > > Hello all, > > > > I'm writing a shell script to feed poudriere testports and I need to get > > <category>/<portname> from ports tree: > > > > `pwd`: > > /home/user/work/freebsd/ports/<category>/<portname> > > > > `pwd | rev | cut -d / -f1,2 | rev` do the trick but it is so uggly! > > > > Is there a shell option to get it? > > > > Thanks, > > -- > > Nuno Teixeira > > FreeBSD Committer (ports) > > -- > () ascii ribbon campaign - for an 8-bit clean world > /\ - against html email - against proprietary attachments > -- Nuno Teixeira FreeBSD Committer (ports)