From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13457 invoked from network); 2 Sep 2004 00:25:40 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 2 Sep 2004 00:25:40 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.34) id 1C2fQ4-0002cz-Cc for arch-gentoo-dev@lists.gentoo.org; Thu, 02 Sep 2004 00:25:40 +0000 Received: (qmail 11860 invoked by uid 89); 2 Sep 2004 00:25:39 +0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 11886 invoked from network); 2 Sep 2004 00:25:39 +0000 Date: Thu, 2 Sep 2004 01:22:36 +0100 From: Ciaran McCreesh To: gentoo-dev@lists.gentoo.org Message-ID: <20040902012236.33da8e1b@snowdrop.home> In-Reply-To: <20040901212144.1d18b048@snowdrop.home> References: <20040901212144.1d18b048@snowdrop.home> X-Mailer: Sylpheed-Claws 0.9.12a (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="Signature=_Thu__2_Sep_2004_01_22_36_+0100_P9JII6kjCJ5RCaLM" Subject: Re: [gentoo-dev] rfc: epause instead of sleep in ebuilds X-Archives-Salt: b3855cc4-a9b5-48a9-a61c-8cee9c52f279 X-Archives-Hash: ce72d8c05544cd54673fcd8a4ad95546 --Signature=_Thu__2_Sep_2004_01_22_36_+0100_P9JII6kjCJ5RCaLM Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit On Wed, 1 Sep 2004 21:21:44 +0100 Ciaran McCreesh wrote: | Currently, we have something like 200 ebuilds which call 'sleep'. How | would people feel about replacing this with an eutils function called | 'epause' (or 'esleep', or 'ezzz', or esitaroundforabit)? Ok, based upon feedback... # Wait for the supplied number of seconds. If no argument is supplied, # defaults to five seconds. If the EPAUSE_IGNORE env var is set, don't # wait. If we're not outputting to a terminal, don't wait. epause() { if [ -z "$EPAUSE_IGNORE" ] && [ -t 1 ] ; then sleep ${1:-5} fi } # Beep the specified number of times (defaults to five). If our output # is not a terminal, don't beep. If the EBEEP_IGNORE env var is set, # don't beep. ebeep() { local n if [ -z "$EBEEP_IGNORE" ] && [ -t 1 ] ; then for ((n=1 ; n <= ${1:-5} ; n++)) ; do echo -ne "\a" sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null echo -ne "\a" sleep 1 done fi } If no-one screams, I'll go ahead with this tomorrow. -- Ciaran McCreesh : Gentoo Developer (Sparc, MIPS, Vim, Fluxbox) Mail : ciaranm at gentoo.org Web : http://dev.gentoo.org/~ciaranm --Signature=_Thu__2_Sep_2004_01_22_36_+0100_P9JII6kjCJ5RCaLM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBNmfP96zL6DUtXhERAixaAKDlHOl9JgiIFDVkcnn+n3fJtUzHVgCdGhFP 3sawe18Cg3wmYSLfFkqRUZ8= =erQL -----END PGP SIGNATURE----- --Signature=_Thu__2_Sep_2004_01_22_36_+0100_P9JII6kjCJ5RCaLM--