Mercurial > MadButterfly
annotate debian/madbuilder.postinst @ 1205:1af64bcdfd7d
Move to MBScene._make_layers_integral()
- Old MBScene.parseScene()/create_framelines()/update_framelines() is
too fragile and inefficiently.
- MBScene._make_layers_integral() is more robust that
- separate logic into removing layer group nodes and adding layer
group nodes
- refactory code of create framelines and layers into methods
- it make logic into layers
- framelines and layers are incremental updated to avoid overhead
of creating/destroying all framelines and layer objects.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 03 Jan 2011 22:12:30 +0800 |
parents | 12464f1138ae |
children |
rev | line source |
---|---|
386
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
2 |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
3 HEADER="#MadBuilder Configuration#" |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
4 FOOTER="#End of MadBuilder Configuration#" |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
5 RC=/etc/mozpluggerrc |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
6 |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
7 CONTAIN=`grep "$HEADER" $RC` |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
8 |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
9 if [ -z "$CONTAIN" ] |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
10 then |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
11 cat <<EOF >> $RC |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
12 |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
13 $HEADER |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
14 application/x-mbsvg:mbsvg: MadButterfly SVG |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
15 swallow(Inkscape) : /usr/share/madbutterfly/inkscape/usr/bin/helper_mb.py "\$file" |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
16 application/x-h:h: MadButterfly SVG h program |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
17 swallow(gedit) : gedit "\$file" |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
18 $FOOTER |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
19 |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
20 EOF |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
21 echo Configuration installed to $RC |
12464f1138ae
[MadBuilder] Install template and configuration to mozpluggerrc
Ben Lau <xbenlau@gmail.com>
parents:
diff
changeset
|
22 fi |