mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
Rework installation colors
This commit is contained in:
parent
6bc6cb599c
commit
36a0c12b3b
@ -1229,14 +1229,18 @@ class inst(Task.Task):
|
||||
"""
|
||||
if os.path.islink(tgt) and os.readlink(tgt) == src:
|
||||
if not self.generator.bld.progress_bar:
|
||||
Logs.info('- symlink %s (to %s)', tgt, src)
|
||||
c1 = Logs.colors.NORMAL
|
||||
c2 = Logs.colors.BLUE
|
||||
Logs.info('%s- symlink %s%s%s (to %s)', c1, c2, tgt, c1, src)
|
||||
else:
|
||||
try:
|
||||
os.remove(tgt)
|
||||
except OSError:
|
||||
pass
|
||||
if not self.generator.bld.progress_bar:
|
||||
Logs.info('+ symlink %s (to %s)', tgt, src)
|
||||
c1 = Logs.colors.NORMAL
|
||||
c2 = Logs.colors.BLUE
|
||||
Logs.info('%s+ symlink %s%s%s (to %s)', c1, c2, tgt, c1, src)
|
||||
os.symlink(src, tgt)
|
||||
self.fix_perms(tgt)
|
||||
|
||||
@ -1245,7 +1249,9 @@ class inst(Task.Task):
|
||||
See :py:meth:`waflib.Build.inst.do_install`
|
||||
"""
|
||||
if not self.generator.bld.progress_bar:
|
||||
Logs.info('- remove %s', tgt)
|
||||
c1 = Logs.colors.NORMAL
|
||||
c2 = Logs.colors.BLUE
|
||||
Logs.info('%s- remove %s%s%s', c1, c2, tgt, c1)
|
||||
|
||||
#self.uninstall.append(tgt)
|
||||
try:
|
||||
@ -1265,7 +1271,9 @@ class inst(Task.Task):
|
||||
"""
|
||||
try:
|
||||
if not self.generator.bld.progress_bar:
|
||||
Logs.info('- remove %s', tgt)
|
||||
c1 = Logs.colors.NORMAL
|
||||
c2 = Logs.colors.BLUE
|
||||
Logs.info('%s- remove %s%s%s', c1, c2, tgt, c1)
|
||||
os.remove(tgt)
|
||||
except OSError:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user