From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C3C98139694 for ; Wed, 12 Apr 2017 19:24:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 27ED6E0BC7; Wed, 12 Apr 2017 19:24:17 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EDB67E0BC7 for ; Wed, 12 Apr 2017 19:24:16 +0000 (UTC) Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 1C7D3340FDA; Wed, 12 Apr 2017 19:24:16 +0000 (UTC) Date: Wed, 12 Apr 2017 15:24:15 -0400 From: Mike Frysinger To: gentoo-catalyst@lists.gentoo.org Cc: christo.kotsi@gmail.com Subject: Re: [gentoo-catalyst] [PATCH 5/6] ln,echo and cp commands concentration Message-ID: <20170412192415.GD24205@vapier> Mail-Followup-To: gentoo-catalyst@lists.gentoo.org, christo.kotsi@gmail.com References: <20170412084349.2017-1-christo.kotsi@gmail.com> <20170412084349.2017-5-christo.kotsi@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2CmXnuBWhlSJqbcw" Content-Disposition: inline In-Reply-To: <20170412084349.2017-5-christo.kotsi@gmail.com> X-Archives-Salt: 8e741a5e-82c1-4b67-b824-770b840c38f9 X-Archives-Hash: e7b19ae2fd95d9c734ca4880193cadc3 --2CmXnuBWhlSJqbcw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On 12 Apr 2017 11:43, Christos Kotsi wrote: > # Tweak the livecd make.conf so that users know not to edit it > # https://bugs.gentoo.org/144647 > -mv ${clst_make_conf} ${clst_make_conf}.old > -echo "####################################################" >> ${clst_make_conf} > -echo "## ATTENTION: THIS IS THE MAKE.CONF ON THE LIVECD ##" >> ${clst_make_conf} > -echo "## PLEASE EDIT /mnt/gentoo${clst_make_conf} INSTEAD ##" >> ${clst_make_conf} > -echo "####################################################" >> ${clst_make_conf} > -cat ${clst_make_conf}.old >> ${clst_make_conf} > - > +echo -e "####################################################\n$(cat ${clst_make_conf})" > ${clst_make_conf} > +echo -e "## PLEASE EDIT /mnt/gentoo${clst_make_conf} INSTEAD ##\n$(cat ${clst_make_conf})" > ${clst_make_conf} > +echo -e "## ATTENTION: THIS IS THE MAKE.CONF ON THE LIVECD ##\n$(cat ${clst_make_conf})" > ${clst_make_conf} > +echo -e "####################################################\n$(cat ${clst_make_conf})" > ${clst_make_conf} this is not an improvement: - the constant cat at the end is ugly - use of `echo -e` is discouraged - you've incorrectly changed some things to tabs you could write it instead: old_conf=$(cat "${clst_make_conf}") ( echo ...all... echo ...the... echo ...things... echo "${old_conf}" ) > "${clst_make_conf}" -mike --2CmXnuBWhlSJqbcw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAljuft8ACgkQQWM7n+g3 9YGtORAAov1Aqdk+dE3fWwnIl3CXXGkLEKWBOF9XIq3Xo4GGW24GidnRMxOXcMxu oq6TdD1tltGjEZ4nH9nHqB3HMNGtoF5HBAiXvL7UODg6iuVsGa0xuaKyXGrncUE5 0e4sENK9E2Tt2oNtsK/byR06R0LWFElxiMEC8fb7k1KRsF+G173tMWWTH6OYTRBo tt/3EwxCXcu+noDnEkEKxK7MrIQiSMYoNfO8vPNNY6h9i7gdOf+4KLZc4edhY7kb PQpa9YMtoJ/AkDyVmWMqxBfgXtz+Tcy2EYJRrFGPRHNQp7AAakHPefj1pl1QZFez LWPH3zCufXRm3l6tnl8pyrih83js5SkNUs00pSeV+XHdHzx2ZntcQ9t/4zG31jVv Sok/p7hQbkNHmzHokh1jghX4IrBjr86ZRmIhM2rzJjWn/+duows5tuKux2oq2LIU ixauYfzZZqHaS4mkZMiXfD7IoMFTOiEH43J+2lAGarMlXnCEO6GZtWjYm1Iys1du N/s6nW0Uje72HQxU+jCO+IZRxHX8f7wC5wa398pJKmpCty8M0JQn6ilZwJu2Syok RpgL/56OpiaQTNv/z4f8j5194aJxcu0awX+ZkrmLAYMGOKFtvV6VqQnqVLiwYXu9 aXkejnPxUySJEWrJjrzs5yAQl1tnrP38XAlfi0CQLnadtbWyX8c= =hjUu -----END PGP SIGNATURE----- --2CmXnuBWhlSJqbcw--