aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2008-07-10 00:05:21 +0000
committerSean Dague2008-07-10 00:05:21 +0000
commit9a06bf47b96a393a95b3a5348368a79f9570121f (patch)
tree7f35205e56c6bffe9d973278eb0007e1aa446d59
parentadded .gitignore which makes using git-svn easier (diff)
downloadopensim-SC_OLD-9a06bf47b96a393a95b3a5348368a79f9570121f.zip
opensim-SC_OLD-9a06bf47b96a393a95b3a5348368a79f9570121f.tar.gz
opensim-SC_OLD-9a06bf47b96a393a95b3a5348368a79f9570121f.tar.bz2
opensim-SC_OLD-9a06bf47b96a393a95b3a5348368a79f9570121f.tar.xz
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.
-rw-r--r--Makefile12
-rwxr-xr-xnant-color52
2 files changed, 64 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b863345
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,12 @@
1all:
2 export PATH=/usr/local/bin:$(PATH)
3 ./runprebuild.sh
4 ./nant-color
5 find OpenSim -name \*.mdb -exec cp {} bin \;
6
7clean:
8 export PATH=/usr/local/bin:$(PATH)
9 ./nant-color clean
10
11tags:
12 find OpenSim -name \*\.cs | xargs etags
diff --git a/nant-color b/nant-color
new file mode 100755
index 0000000..ca5ea37
--- /dev/null
+++ b/nant-color
@@ -0,0 +1,52 @@
1#!/usr/bin/ruby
2
3
4def main
5 IO.popen("nant #{ARGV.join(' ')}") { |pipe|
6 pipe.sync = true
7 while str = pipe.gets
8 str.sub!(/\n+/, '')
9 puts colorize(str)
10 end
11 }
12end
13
14def clear
15 return "\e[0m"
16end
17
18def red(str)
19 return "\e[31m" + str + clear
20end
21
22def green(str)
23 return "\e[32m" + str + clear
24end
25
26def yellow(str)
27 return "\e[33m" + str + clear
28end
29
30def black
31 return "\e[30m"
32end
33
34def hide
35 return "\e[8m"
36end
37
38def bright
39 return "\e[1m"
40end
41
42def colorize(str)
43 str.sub!(/(error \w+:.*)/, red('\1'))
44 str.sub!(/(warning \w+:.*)/, yellow('\1'))
45
46 str.sub!(/(Build Succeeded)/i, green('\1'))
47 str.sub!(/(Compilation succeeded)/, green('\1'))
48 str.sub!(/(\d+ warning\(s\))/, yellow('\1'))
49 return str
50end
51
52main()