scripts/lemon-0.x-to-1.x.sh
changeset 305 069f27927ba9
child 306 2bf7c645d5a6
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/lemon-0.x-to-1.x.sh	Mon Oct 06 13:02:13 2008 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +set -e
     1.7 +
     1.8 +if [ $# -eq 0 -o x$1 = "x-h" -o x$1 = "x-help" -o x$1 = "x--help" ]; then
     1.9 +	echo "Usage:"
    1.10 +	echo "  $0 source-file"
    1.11 +	exit
    1.12 +fi
    1.13 +
    1.14 +TMP=`mktemp`
    1.15 +
    1.16 +sed -e "s/bipartite undirected graph/bipartite graph/g"\
    1.17 +	-e "s/undirected graph/_gr_aph_label_/g"\
    1.18 +	-e "s/undirected edge/_ed_ge_label_/g"\
    1.19 +	-e "s/graph_/_gr_aph_label__/g"\
    1.20 +	-e "s/_graph/__gr_aph_label_/g"\
    1.21 +	-e "s/UGraph/_Gr_aph_label_/g"\
    1.22 +	-e "s/uGraph/_gr_aph_label_/g"\
    1.23 +	-e "s/ugraph/_gr_aph_label_/g"\
    1.24 +	-e "s/Graph/_Digr_aph_label_/g"\
    1.25 +	-e "s/graph/_digr_aph_label_/g"\
    1.26 +	-e "s/UEdge/_Ed_ge_label_/g"\
    1.27 +	-e "s/uEdge/_ed_ge_label_/g"\
    1.28 +	-e "s/uedge/_ed_ge_label_/g"\
    1.29 +	-e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
    1.30 +	-e "s/Edge/_Ar_c_label_/g"\
    1.31 +	-e "s/edge/_ar_c_label_/g"\
    1.32 +	-e "s/ANode/_Re_d_label_/g"\
    1.33 +	-e "s/BNode/_Blu_e_label_/g"\
    1.34 +	-e "s/A-Node/_Re_d_label_/g"\
    1.35 +	-e "s/B-Node/_Blu_e_label_/g"\
    1.36 +	-e "s/anode/_re_d_label_/g"\
    1.37 +	-e "s/bnode/_blu_e_label_/g"\
    1.38 +	-e "s/aNode/_re_d_label_/g"\
    1.39 +	-e "s/bNode/_blu_e_label_/g"\
    1.40 +	-e "s/_Digr_aph_label_/Digraph/g"\
    1.41 +	-e "s/_digr_aph_label_/digraph/g"\
    1.42 +	-e "s/_Gr_aph_label_/Graph/g"\
    1.43 +	-e "s/_gr_aph_label_/graph/g"\
    1.44 +	-e "s/_Ar_c_label_/Arc/g"\
    1.45 +	-e "s/_ar_c_label_/arc/g"\
    1.46 +	-e "s/_Ed_ge_label_/Edge/g"\
    1.47 +	-e "s/_ed_ge_label_/edge/g"\
    1.48 +	-e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\
    1.49 +	-e "s/_Re_d_label_/Red/g"\
    1.50 +	-e "s/_Blu_e_label_/Blue/g"\
    1.51 +	-e "s/_re_d_label_/red/g"\
    1.52 +	-e "s/_blu_e_label_/blue/g"\
    1.53 +<$1 > $TMP
    1.54 +
    1.55 +mv $TMP $1
    1.56 \ No newline at end of file