[pacman-dev] [PATCH] Refactor testing for color message output

Allan McRae allan at archlinux.org
Sun Mar 15 17:41:59 EDT 2009


Dan McGee wrote:
> On Sat, Mar 14, 2009 at 9:11 AM, Allan McRae <allan at archlinux.org> wrote:
>   
>> Signed-off-by: Allan McRae <allan at archlinux.org>
>> ---
>>  scripts/makepkg.sh.in |   16 +++++++++++-----
>>  1 files changed, 11 insertions(+), 5 deletions(-)
>>
>> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
>> index 3ff256f..d44fe0d 100644
>> --- a/scripts/makepkg.sh.in
>> +++ b/scripts/makepkg.sh.in
>> @@ -69,6 +69,7 @@ IGNOREARCH=0
>>  HOLDVER=0
>>  PKGFUNC=0
>>  SPLITPKG=0
>> +COLORMSG=0
>>
>>  # Forces the pkgver of the current PKGBUILD. Used by the fakeroot call
>>  # when dealing with svn/cvs/etc PKGBUILDs.
>> @@ -80,7 +81,7 @@ PACMAN_OPTS=
>>
>>  plain() {
>>        local mesg=$1; shift
>> -       if [ -t 2 -a ! "$USE_COLOR" = "n" -a "$(check_buildenv color)" = "y" ]; then
>> +       if [ COLORMSG -eq 1 ]; then
>>     
> This works with just COLORMSG and not $COLORMSG?
>   

Well, probably not... but I'm sure my last testing run had colour 
messages.  Not sure why.  I will adjust/rebuild/recheck.

Allan





More information about the pacman-dev mailing list