Move main code to virt_df_main.ml and provide explicit interface virt_df.mli
[virt-top.git] / virt-ctrl / rebuild-icons.sh
1 #!/bin/sh -
2 # Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 # Generate vc_icons.ml
19
20 echo <<'EOF'
21 (* The file vc_icons.ml is automatically generated from rebuild-icons.sh
22  * Any changes you make will be lost.
23  *)
24
25 EOF
26 echo
27
28 # Open any modules which may use icons.
29 echo "open Vc_connection_dlg"
30 echo
31
32 while [ $# -gt 0 ]; do
33     size="$1"
34     name="$2"
35     filename="$3"
36     shift 3
37
38     gdk-pixbuf-mlsource "$filename"
39     echo ";;"
40
41     name=`echo -n $name | tr -cs '[0-9a-zA-Z]' '_'`
42
43     echo "icon_${size}x${size}_$name := Some (pixbuf ()) ;;"
44 done