From b08939216f2df474f6a8103a7f0e19e8fb8911e0 Mon Sep 17 00:00:00 2001 From: Aron Griffis Date: Thu, 16 Mar 2006 03:44:54 +0000 Subject: [PATCH] Replace _epatch_draw_line() with a very short shell script --- eclass/eutils.eclass | 26 ++++---------------------- 1 file 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 # @@ -138,27 +138,9 @@ EPATCH_FORCE="no" # (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="" -- 2.26.2