From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B7B241381F3 for ; Tue, 23 Apr 2013 05:44:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71100E0943; Tue, 23 Apr 2013 05:44:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D3F5E0943 for ; Tue, 23 Apr 2013 05:44:46 +0000 (UTC) Received: from pomiocik.lan (77-254-76-26.adsl.inetia.pl [77.254.76.26]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 92C3733DD80; Tue, 23 Apr 2013 05:44:44 +0000 (UTC) Date: Tue, 23 Apr 2013 07:46:05 +0200 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-python@lists.gentoo.org Cc: python@gentoo.org Subject: [gentoo-python] [PATCHES] Use bash built-ins rather than external tools Message-ID: <20130423074605.043d7456@pomiocik.lan> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/S4BPPo9YRg+AZSW810RAgo_"; protocol="application/pgp-signature" X-Archives-Salt: 1876bfaf-d9bb-4368-82e9-5110dac266f3 X-Archives-Hash: f9ac9a9eaf068c47ec46e7ba4e274b6a --Sig_/S4BPPo9YRg+AZSW810RAgo_ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/S4BPPo9YRg+AZSW810RAgo_ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRdiAdXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKAWsP/R7khOCEmGe9HfQWOCNslAgZ UjWHAN+RR7tkjDOzL1t8LL1pocYK27NzjYEGK8+xuYY7V4iEyNBhwY/CeOluzAon IrPTwoDvf4n5WM//+zdAj8UcwwtJdRuPO33bezty9GjWgUhAEzwGYcKsJhl4VJST tQZWb9ZU/rc73wZixCesgBf7md47HtJjqswsIRGWTEQiDZegHRC5kUqvmLUP0msS g8mO0n6coH3MqadgU5O9nBEHSp+8alewfHUaV1/Brc4Zay2mAHPE67oR+NtBMuHq 0X44NSCmT6lm4sj0nvuerQXjtVwm24ptvBn6NQsJo4ohFnzfZiIXxEpO0nCC5WSq YipuPQXN+UAQOnOmhiOn3fYwtk5plvu1cRKr9CdBCNTidVJhkQyf9brnPTW59Bsw gInnllVtOIsPWFiMsxQcluggdOfebn1HxarGqPTmXhcFmX2F6mmy6QLN+zo1GnbN nN69VPvPMHB+u4JmeBSx4f+9upyGFt8ponHCYRIth2ulHcKFC2YzLZBgsm3jBUVk 7TP77HViUAH4h3M+lMt06q4/8FuQyO5TkB1fninrmijIGkkLJaD9s14QpQeMvhob jZAMRThXu3VG0l1bxLVNmeQ/JAw5rJ/jkQyvEa8z+vYlOqeq0ZnUSvfblUI3QgNB 8CrdBcJKsLtE+N6pN9Dm =kq8u -----END PGP SIGNATURE----- --Sig_/S4BPPo9YRg+AZSW810RAgo_--