Gentoo Archives: gentoo-dev

From: "Michael Sterrett -Mr. Bones.-" <msterret@××××.com>
To: Ciaran McCreesh <ciaranm@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: epause instead of sleep in ebuilds
Date: Wed, 01 Sep 2004 22:41:05
Message-Id: Pine.LNX.4.58.0409011840390.21775@rutrow.coat.com
In Reply to: Re: [gentoo-dev] rfc: epause instead of sleep in ebuilds by Ciaran McCreesh
1 Please wrap this is a NOBEEP variable or something so I can turn it all
2 off easily from make.conf.
3
4 Thanks,
5
6 Michael Sterrett
7 -Mr. Bones.-
8 mr_bones_@g.o
9
10
11 On Wed, 1 Sep 2004, Ciaran McCreesh wrote:
12
13 > On Wed, 01 Sep 2004 13:49:30 -0700 Seemant Kulleen <seemant@g.o>
14 > wrote:
15 > | That's a great idea. Along these lines, perhaps something
16 > | standardised for the beeping einfo's would be nice too. I know at
17 > | least three packages which make use of the beeping einfo messages
18 > | (portage, gaim and xorg-x11) -- it'd be nice to make it a function
19 > | rather than the stuff that's happening now.
20 >
21 > Ok, how's this look?
22 >
23 > # Beep the specified number of times (defaults to five). If our output
24 > # is not a terminal, or if seq (part of coreutils) is unavailable, don't
25 > # beep.
26 > ebeep() {
27 > local n
28 > if [ -t 1 ] && [ -x /bin/seq ] ; then
29 > for n in $(seq 1 ${1:-5}) ; do
30 > echo -ne "\a"
31 > sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null
32 > echo -ne "\a"
33 > sleep 1
34 > done
35 > fi
36 > }
37 >
38 > I think this might not work on OSX, not sure that they have a seq
39 > available (although they should...).
40 >
41 > --
42 > Ciaran McCreesh : Gentoo Developer (Sparc, MIPS, Vim, Fluxbox)
43 > Mail : ciaranm at gentoo.org
44 > Web : http://dev.gentoo.org/~ciaranm
45 >
46 >
47
48 --
49 gentoo-dev@g.o mailing list