]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/patch_deps.sh
2abbbeab10308c2f01458b8209390f5f42614691
[helm.git] / helm / ocaml / patch_deps.sh
1 #!/bin/sh
2 # script args: source_file target_file
3
4 use_clusters='yes'
5
6 # args: file snippet
7 # file will be modified in place
8 include_dot_snippet ()
9 {
10   echo "Adding to $1 graphviz snipet $2 ..."
11   sed -i "/digraph/r $2" $1
12 }
13
14 # args: file patch
15 apply_patch ()
16 {
17   if [ -f "$2" ]; then
18     echo "Applying to $1 patch $2 ..."
19     patch $1 $2
20   fi
21 }
22
23 cp $1 $2
24 apply_patch $2 deps.patch
25 include_dot_snippet $2 daemons.dot
26 if [ "$use_clusters" = "yes" ]; then
27   include_dot_snippet $2 clusters.dot
28 fi
29