/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.244 Revision 1.245
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.244 2006/07/06 23:53:57 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.245 2006/07/15 19:26:55 vapier Exp $
4# 4#
5# This eclass is for general purpose functions that most ebuilds 5# This eclass is for general purpose functions that most ebuilds
6# have to implement themselves. 6# have to implement themselves.
7# 7#
8# NB: If you add anything, please comment it! 8# NB: If you add anything, please comment it!
17# to five seconds. If the EPAUSE_IGNORE env var is set, don't wait. If we're not 17# to five seconds. If the EPAUSE_IGNORE env var is set, don't wait. If we're not
18# outputting to a terminal, don't wait. For compatability purposes, the argument 18# outputting to a terminal, don't wait. For compatability purposes, the argument
19# must be an integer greater than zero. 19# must be an integer greater than zero.
20# Bug 62950, Ciaran McCreesh <ciaranm@gentoo.org> (05 Sep 2004) 20# Bug 62950, Ciaran McCreesh <ciaranm@gentoo.org> (05 Sep 2004)
21epause() { 21epause() {
22 if [ -z "$EPAUSE_IGNORE" ] && [ -t 1 ] ; then 22 [[ -z ${EPAUSE_IGNORE} ]] && sleep ${1:-5}
23 sleep ${1:-5}
24 fi
25} 23}
26 24
27# Beep the specified number of times (defaults to five). If our output 25# Beep the specified number of times (defaults to five). If our output
28# is not a terminal, don't beep. If the EBEEP_IGNORE env var is set, 26# is not a terminal, don't beep. If the EBEEP_IGNORE env var is set,
29# don't beep. 27# don't beep.
30# Bug 62950, Ciaran McCreesh <ciaranm@gentoo.org> (05 Sep 2004) 28# Bug 62950, Ciaran McCreesh <ciaranm@gentoo.org> (05 Sep 2004)
31ebeep() { 29ebeep() {
32 local n 30 local n
33 if [ -z "$EBEEP_IGNORE" ] && [ -t 1 ] ; then 31 if [[ -z ${EBEEP_IGNORE} ]] ; then
34 for ((n=1 ; n <= ${1:-5} ; n++)) ; do 32 for ((n=1 ; n <= ${1:-5} ; n++)) ; do
35 echo -ne "\a" 33 echo -ne "\a"
36 sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null 34 sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null
37 echo -ne "\a" 35 echo -ne "\a"
38 sleep 1 36 sleep 1

Legend:
Removed from v.1.244  
changed lines
  Added in v.1.245

  ViewVC Help
Powered by ViewVC 1.1.20