public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Amadeusz Żołnowski" <aidecoe@gentoo.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Closed: [PATCH] eutils.eclass: Add awk wrapper - eawk - edit file in place
Date: Sun, 22 May 2016 08:17:28 +0100	[thread overview]
Message-ID: <874m9qwohj.fsf@freja.aidecoe.name> (raw)
In-Reply-To: <20160522004518.GG26300@vapier.lan>

[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]

Mike Frysinger <vapier@gentoo.org> writes:
> neither of those are terribly compelling and can be written in sed.
> you want to do a match & replace in that just as easily.  roughly:
> 	sed -i \
> 		-e '/{[[:space:]]*deps[[:space:]]*,\/,\/}/{s:.*:{deps, []}:}' \
> 		foo

Oh, I know how to use sed&replace on a single line. What if deps tuple
spans over multiple line which is usually the case? I have an idea how
to do it in sed but awk is much simpler to approach this.

> because no one else is using it or cares about it.  we've gotten by
> for more than 10 years at this point w/out someone asking for this.

Or met the same argument and given up... ;-)

> if you really want it in rebar, then just DEPEND on gawk and use the
> inplace flag in your code.  then there's no need for eawk anywhere.

Already did that. At the beggining I wanted to use sponge from moreutils
but I assumed it's not desired to depend on some tool not in @system or
specific gawk implementation and version (which is not even stabilized
yet) just for eclass/ebuild internals. But apparently it's fine, so I
did that, as I've said in some other response.

-- 
Amadeusz Żołnowski

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 950 bytes --]

  reply	other threads:[~2016-05-22  7:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 21:25 [gentoo-dev] [PATCH] eutils.eclass: Add awk wrapper - eawk - edit file in place aidecoe
2016-05-18 22:28 ` Göktürk Yüksek
2016-05-18 22:53   ` Amadeusz Żołnowski
2016-05-18 23:31     ` Göktürk Yüksek
2016-05-19  0:09       ` Jeroen Roovers
2016-05-19  2:02         ` Göktürk Yüksek
2016-05-19  9:35     ` Ulrich Mueller
2016-05-19 17:51       ` Amadeusz Żołnowski
2016-05-19 18:13         ` Mart Raudsepp
2016-05-19 18:35           ` Ulrich Mueller
2016-05-19 20:04             ` Amadeusz Żołnowski
2016-05-20  9:31               ` Ulrich Mueller
2016-05-18 22:43 ` Robin H. Johnson
2016-05-19 21:50   ` Amadeusz Żołnowski
2016-05-19 22:04     ` Robin H. Johnson
2016-05-20 17:42       ` Amadeusz Żołnowski
2016-05-21 12:20         ` Amadeusz Żołnowski
2016-05-19 23:16 ` Mart Raudsepp
2016-05-19 23:29   ` Göktürk Yüksek
2016-05-20  3:07   ` Mike Frysinger
2016-05-20 16:49   ` Amadeusz Żołnowski
2016-05-20  3:08 ` Mike Frysinger
2016-05-20 19:32   ` Patrice Clement
2016-05-20 19:47     ` rindeal
2016-05-20 20:09   ` Amadeusz Żołnowski
2016-05-21 14:58     ` Mike Frysinger
2016-05-21 16:08       ` Amadeusz Żołnowski
2016-05-21 16:27         ` Kristian Fiskerstrand
2016-05-22  0:45         ` Mike Frysinger
2016-05-22  7:17           ` Amadeusz Żołnowski [this message]
2016-05-22  7:45           ` Michał Górny
2016-05-21 12:45 ` aidecoe
2016-05-21 13:41   ` [gentoo-dev] " Amadeusz Żołnowski
2016-05-21 13:49   ` [gentoo-dev] " aidecoe
2016-05-21 20:38     ` Michał Górny
2016-05-21 21:20       ` Amadeusz Żołnowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874m9qwohj.fsf@freja.aidecoe.name \
    --to=aidecoe@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox