added convenience makefile and nant-color script. I've had these
on my laptop forever, and others might find them useful to be part of the main tree.0.6.0-stable
parent
de42154b62
commit
9a06bf47b9
|
@ -0,0 +1,12 @@
|
|||
all:
|
||||
export PATH=/usr/local/bin:$(PATH)
|
||||
./runprebuild.sh
|
||||
./nant-color
|
||||
find OpenSim -name \*.mdb -exec cp {} bin \;
|
||||
|
||||
clean:
|
||||
export PATH=/usr/local/bin:$(PATH)
|
||||
./nant-color clean
|
||||
|
||||
tags:
|
||||
find OpenSim -name \*\.cs | xargs etags
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/ruby
|
||||
|
||||
|
||||
def main
|
||||
IO.popen("nant #{ARGV.join(' ')}") { |pipe|
|
||||
pipe.sync = true
|
||||
while str = pipe.gets
|
||||
str.sub!(/\n+/, '')
|
||||
puts colorize(str)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
def clear
|
||||
return "\e[0m"
|
||||
end
|
||||
|
||||
def red(str)
|
||||
return "\e[31m" + str + clear
|
||||
end
|
||||
|
||||
def green(str)
|
||||
return "\e[32m" + str + clear
|
||||
end
|
||||
|
||||
def yellow(str)
|
||||
return "\e[33m" + str + clear
|
||||
end
|
||||
|
||||
def black
|
||||
return "\e[30m"
|
||||
end
|
||||
|
||||
def hide
|
||||
return "\e[8m"
|
||||
end
|
||||
|
||||
def bright
|
||||
return "\e[1m"
|
||||
end
|
||||
|
||||
def colorize(str)
|
||||
str.sub!(/(error \w+:.*)/, red('\1'))
|
||||
str.sub!(/(warning \w+:.*)/, yellow('\1'))
|
||||
|
||||
str.sub!(/(Build Succeeded)/i, green('\1'))
|
||||
str.sub!(/(Compilation succeeded)/, green('\1'))
|
||||
str.sub!(/(\d+ warning\(s\))/, yellow('\1'))
|
||||
return str
|
||||
end
|
||||
|
||||
main()
|
Loading…
Reference in New Issue