Replace _epatch_draw_line() with a very short shell script
authorAron Griffis <agriffis@gentoo.org>
Thu, 16 Mar 2006 03:44:54 +0000 (03:44 +0000)
committerAron Griffis <agriffis@gentoo.org>
Thu, 16 Mar 2006 03:44:54 +0000 (03:44 +0000)
eclass/eutils.eclass

index 476540065ab2de497c89b4bdeb353c034cc6dde7..723f80a7a05e58ae84928d35c72c0ff32f247dbd 100644 (file)
@@ -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=""