Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Oct 2022 00:30:43 +0200
From:      Robert Clausecker <fuz@fuz.su>
To:        Nuno Teixeira <eduardo@freebsd.org>
Cc:        ports@freebsd.org
Subject:   Re: sh: getting <category>/<portname> from pwd
Message-ID:  <Y1hjkxKtXJjlp9AX@fuz.su>
In-Reply-To: <CAFDf7UJp9PkrhfMmJRKO7QNTmGQYu7BQYyqczoz-Dy7hP3h74g@mail.gmail.com>
References:  <CAFDf7UJp9PkrhfMmJRKO7QNTmGQYu7BQYyqczoz-Dy7hP3h74g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Nuno,

Try `make -VPKGORIGIN`

Yours,
Robert Clausecker

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y1hjkxKtXJjlp9AX>