From nobody Tue Oct 25 23:05:46 2022 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mxnc640JSz4gH9R for ; Tue, 25 Oct 2022 23:05:58 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mxnc63VnVz3rFZ for ; Tue, 25 Oct 2022 23:05:58 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666739158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GU77/p39LzLewizlczPkHR5OyV0JmdBz337WF3f8weA=; b=sx0cN6mTB8PhIRWJJear7oWZBox5ClQ8PpYFFbPhLS8sjqNbO318aSC4JQGgM5IYLy7I0n /Zp6unaKeL95nD5WdZmAihqX0bVQPuBV11dHJjD5qawydrQXVc+tSpjYLmiJYjT6K3wZhO BFJKbjdCvXqH/D7EE5IMzkM8S5v1/PYZN8Hrvp6lGBDpuy/tB/Njc6P86TYzYBhmU7iKZw sQAZN4dx/3VEgRBwrWg27w7gZU1+d57ANoblpomDHRx8KlL+gHNxe7Hq2+xj5bX6cBMPI5 0MH4XK/l61gDJ4o23fAVjA5323K6RSNUzv811ISnx3cJ9ZMLvjSgtRojSzaA3g== Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Mxnc62JQdz18tb for ; Tue, 25 Oct 2022 23:05:58 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vk1-f175.google.com with SMTP id t85so6231397vkb.7 for ; Tue, 25 Oct 2022 16:05:58 -0700 (PDT) X-Gm-Message-State: ACrzQf02J7+RHYvuOpiuZBI/INl3aRImvxEKr+Vj5Z4mEjPkdgXlGCpR 7+FiD7xW2Kt46gOblN2RpCKE3N/inCUNsmkjiHU= X-Google-Smtp-Source: AMsMyM7RRV+b020pZzMikNXOrwgiOccG4PmCtC4oamtZs+4896XvqowmnqpoVsidmIWsoijcmUXODECNIuVygvftOXo= X-Received: by 2002:a1f:2dd1:0:b0:3b2:46f9:a5c8 with SMTP id t200-20020a1f2dd1000000b003b246f9a5c8mr16700752vkt.24.1666739157935; Tue, 25 Oct 2022 16:05:57 -0700 (PDT) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Nuno Teixeira Date: Wed, 26 Oct 2022 00:05:46 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: sh: getting / from pwd To: Robert Clausecker Cc: ports@freebsd.org Content-Type: multipart/alternative; boundary="000000000000712abb05ebe3f3a9" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666739158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GU77/p39LzLewizlczPkHR5OyV0JmdBz337WF3f8weA=; b=feYg/0Kc8Gzl6mVIyY+NMuXdDGg4gXKMk9rMYUhSARxhPXwHIeU0W+Y++h6tpnMtjeC6tq Ylz9hATuEukpGEr/eunqqDDu+LsT8tPFP5cuRc9cYTqSFzNM9cN9etIYbEvK2ZG4jXGzvF TV4O+tyXTpuOyjmbZzyTEu9W8aCXT+RU23JqlvEXf6EEBymI9m5jYR01oGYG+wypaBeDHM HHEsw3UuvCMyv8i4vdLtbVe+Jqr2bIVxtd4VhqhSOiPpMb8V2MDAxPHp7iYGnqebu2aPwn Y87SpQm4McL1pojfwswBHUs8s8HGtAihQVHts/KsWLXkuDklKUIGsSee5ARAIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666739158; a=rsa-sha256; cv=none; b=U+iks8LHQ3yNaEGf58755xkYersRS0jFQa6qG4Vr5frewZaz3RWJTSThtIH/1VoOgScgLF awUImV7zuMre1on9vDL5KJ2aYb6ffT9E+gfYDTKQ+mZpWyc4SLZOLwDCr3gkwi9qLkTVFG 1wnuxkvlI4AJPckmVWGeoSTye1m+hTa/Kixm1UU5ame9C+Wr+YwXp3pKavHl39Jd122xDV zTUjm2MFIdTWToWS5E/foOTR62ez5bj6xKVUn1hS0UnRGTDTF8ClY1pb+pho27qFGuRVmB e3TgJSBFjiiKS/ZBWEyec6v8IAR1vfEfdTGr+ANElRo+4iUqzZV3JJLevlaGEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --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 > > / from ports tree: > > > > `pwd`: > > /home/user/work/freebsd/ports// > > > > `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
Hi,

Try `make -VPKGORIGIN`

Perfect!

Thanks
=C2=A0


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)

--
()=C2=A0 ascii ribbon campaign - for an 8-bit clean world
/\=C2=A0 - against html email=C2=A0 - against proprietary attachments


--
Nun= o Teixeira
FreeBSD Committer (ports)
--000000000000712abb05ebe3f3a9--