|
8 | 8 | # |
9 | 9 | # Ensure we have the expected number of arguments. |
10 | 10 | # |
11 | | -if [ $# != 2 ]; then |
12 | | - echo "USAGE: DOGEN_BINARY CODEC" >&2 |
| 11 | +if [ $# != 1 ]; then |
| 12 | + echo "USAGE: DOGEN_BINARY" >&2 |
13 | 13 | exit 1; |
14 | 14 | fi |
15 | 15 |
|
@@ -38,22 +38,11 @@ dogen_general_options="${dogen_general_options} --byproduct-directory ${dogen_lo |
38 | 38 | # |
39 | 39 | # Convert all models |
40 | 40 | # |
41 | | -frontend="dia" |
| 41 | +frontend="org" |
42 | 42 | models="CSharpRefImpl.CSharpModel CSharpRefImpl.DirectorySettings CSharpRefImpl.LamModel CSharpRefImpl.Profiles"; |
43 | 43 | for model in ${models}; do |
44 | | - echo "Converting ${model} to $2"; |
45 | | - if [ "$2" = "json" ]; then |
46 | | - dogen_source_option="--source ${script_dir}/dia/${model}.${frontend}"; |
47 | | - dogen_destination_option="--destination ${script_dir}/json/${model}.tmp.json"; |
48 | | - ${dogen_binary} convert ${dogen_general_options} ${dogen_source_option} ${dogen_destination_option} |
49 | | - jq . ${script_dir}/json/${model}.tmp.json > ${script_dir}/json/${model}.json |
50 | | - rm ${script_dir}/json/${model}.tmp.json |
51 | | - elif [ "$2" = "org" ]; then |
52 | | - dogen_source_option="--source ${script_dir}/dia/${model}.${frontend}"; |
53 | | - dogen_destination_option="--destination ${script_dir}/org/${model}.org"; |
54 | | - ${dogen_binary} convert ${dogen_general_options} ${dogen_source_option} ${dogen_destination_option} |
55 | | - else |
56 | | - echo "Unsupported codec: " $2 |
57 | | - exit 1; |
58 | | - fi |
| 44 | + echo "Converting ${model} to PlantUML"; |
| 45 | + dogen_source_option="--source ${script_dir}/${frontend}/${model}.${frontend}"; |
| 46 | + dogen_destination_option="--destination ${script_dir}/org/${model}.plantuml"; |
| 47 | + ${dogen_binary} convert ${dogen_general_options} ${dogen_source_option} ${dogen_destination_option} |
59 | 48 | done |
0 commit comments