public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] [PATCHES] Use bash built-ins rather than external tools
@ 2013-04-23  5:46 Michał Górny
  2013-04-23  5:46 ` [gentoo-python] [PATCH 1/2] Replace sed call with variable substitution Michał Górny
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michał Górny @ 2013-04-23  5:46 UTC (permalink / raw
  To: gentoo-python; +Cc: python

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

Hi,

Two quick patches. They switch our eclasses to use bash built-ins
whenever possible to avoid the whole overhead of calling external tools
and piping variables to them to perform simple tasks.

First replaces the 'sed' call in _python_rewrite_shebang() with local
variable substitution to remove the CR.

Second replaces both uses of 'head -n 1' with simple 'read' call to
obtain the first line.

-- 
Best regards,
Michał Górny

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-30  5:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23  5:46 [gentoo-python] [PATCHES] Use bash built-ins rather than external tools Michał Górny
2013-04-23  5:46 ` [gentoo-python] [PATCH 1/2] Replace sed call with variable substitution Michał Górny
2013-04-23  5:46 ` [gentoo-python] [PATCH 2/2] Replace 'head -n 1' calls with 'read' built-in Michał Górny
2013-04-30  5:37 ` [gentoo-python] [PATCHES] Use bash built-ins rather than external tools Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox