summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2006-03-16 03:44:54 +0000
committerAron Griffis <agriffis@gentoo.org>2006-03-16 03:44:54 +0000
commit7015b26f21201024b7e77134686e1f193b04ebe0 (patch)
tree48cc0bddd0403b1a5c41e6328c93b065d18fcc87
parentPut the 0.99 series back in the testing branch. Fixed references to shared da... (diff)
downloadgentoo-2-7015b26f21201024b7e77134686e1f193b04ebe0.tar.gz
gentoo-2-7015b26f21201024b7e77134686e1f193b04ebe0.tar.bz2
gentoo-2-7015b26f21201024b7e77134686e1f193b04ebe0.zip
Replace _epatch_draw_line() with a very short shell script
-rw-r--r--eclass/eutils.eclass26
1 files changed, 4 insertions, 22 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 476540065ab2..723f80a7a05e 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.228 2006/03/10 23:24:21 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.229 2006/03/16 03:44:54 agriffis Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -138,27 +138,9 @@ EPATCH_FORCE="no"
# <azarah@gentoo.org> (10 Nov 2002)
#
epatch() {
- _epatch_draw_line() {
- # this func produces a lot of pointless noise when debugging is turned on ...
- local is_debug=0
- [[ $- == *x* ]] && is_debug=1 && set +x
-
- local i=0 str_length="" str_out=""
-
- # Handle calls that do not have args, or wc not being installed ...
- if [[ -z $1 ]] || ! type -p wc >/dev/null ; then
- str_length=65
- else
- str_length=$(echo -n "$*" | wc -m)
- fi
-
- while ((i++ < ${str_length})) ; do
- str_out="${str_out}="
- done
- echo ${str_out}
-
- [[ ${is_debug} -eq 1 ]] && set -x
- return 0
+ _epatch_draw_line() {
+ [[ -z $1 ]] && set "$(printf "%65s" '')"
+ echo "${1//?/=}"
}
_epatch_assert() { local _pipestatus=${PIPESTATUS[*]}; [[ ${_pipestatus// /} -eq 0 ]] ; }
local PIPE_CMD=""