diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-01-11 22:57:01 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-01-12 18:38:47 +0100 |
commit | f252986f1efbb8a8667e304640903ef5206e8b26 (patch) | |
tree | 2e70b834d156fbf9474a9147fe204c808cfb18d9 | |
parent | 5490500350ebc9f4fd362767ac5eed011a6531f7 (diff) |
fix duplicate removal
-rwxr-xr-x | bin/umlauf-to-dot | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/umlauf-to-dot b/bin/umlauf-to-dot index 47a766c..081380a 100755 --- a/bin/umlauf-to-dot +++ b/bin/umlauf-to-dot @@ -125,9 +125,11 @@ push( @cycle_ids, keys %{ $map->{$line}{cycle} // {} } ); say "digraph Umlauf {"; +my @all_lines; for my $cycle_id (@cycle_ids) { - say join( "\n", uniq build_cycle( $line, $cycle_id ) ); + push( @all_lines, build_cycle( $line, $cycle_id ) ); } +say join( "\n", uniq @all_lines ); printf( "%s [style=bold];\n", format_train( $line, $map->{$line} ) ); |