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

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000712abb05ebe3f3a9
Content-Type: text/plain; charset="UTF-8"

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)

--000000000000712abb05ebe3f3a9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div>Hi,</div><div><br></div></div><div c=
lass=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Try `make -VPKGORIGIN`<br></blockquote><div><br></div><div>Perfect!</div><d=
iv><br></div><div>Thanks<br></div><div>=C2=A0</div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex">
<br>
<br>
Am Tue, Oct 25, 2022 at 11:14:42PM +0100 schrieb Nuno Teixeira:<br>
&gt; Hello all,<br>
&gt; <br>
&gt; I&#39;m writing a shell script to feed poudriere testports and I need =
to get<br>
&gt; &lt;category&gt;/&lt;portname&gt; from ports tree:<br>
&gt; <br>
&gt; `pwd`:<br>
&gt; /home/user/work/freebsd/ports/&lt;category&gt;/&lt;portname&gt;<br>
&gt; <br>
&gt; `pwd | rev | cut -d / -f1,2 | rev` do the trick but it is so uggly!<br=
>
&gt; <br>
&gt; Is there a shell option to get it?<br>
&gt; <br>
&gt; Thanks,<br>
&gt; -- <br>
&gt; Nuno Teixeira<br>
&gt; FreeBSD Committer (ports)<br>
<br>
-- <br>
()=C2=A0 ascii ribbon campaign - for an 8-bit clean world <br>
/\=C2=A0 - against html email=C2=A0 - against proprietary attachments<br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nun=
o Teixeira<br>FreeBSD Committer (ports)</span></div></div></div>

--000000000000712abb05ebe3f3a9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7U%2BAvBg362AuCnPq6KQaTOxeSxwDoH_AoKbVOif-mHFqyg>