diff options
author | root <root@riffraff.tg14.gathering.org> | 2014-04-20 02:58:05 +0200 |
---|---|---|
committer | root <root@riffraff.tg14.gathering.org> | 2014-04-20 02:58:05 +0200 |
commit | 8f4ae8e5833f0d26be5fad5160ae6ee0479b0712 (patch) | |
tree | da5089e91fbe52fd7da57a1c431c9af64f6ac8af /clients/update-switch-placements.pl | |
parent | 37a3b5d6ed97367989aecc875f1db1e9eb0458df (diff) | |
parent | 19cd0064816a577b72577b9f21a5a946eb746f64 (diff) |
Merge branch 'master' of https://github.com/tech-server/tgmanage
Diffstat (limited to 'clients/update-switch-placements.pl')
-rw-r--r-- | clients/update-switch-placements.pl | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/clients/update-switch-placements.pl b/clients/update-switch-placements.pl deleted file mode 100644 index d635f87..0000000 --- a/clients/update-switch-placements.pl +++ /dev/null @@ -1,53 +0,0 @@ -#! /usr/bin/perl - -print "begin;\n"; -print "delete from placements;\n"; - -open PATCHLIST, "../patchlist.txt" - or die "../patchlist.txt: $!"; - -my $RANGE = "87.76."; - -my $i = 1; -while (<PATCHLIST>) { - chomp; - my ($name, $distro, $port) = split / /; - - $name =~ /e(\d+)-(\d+)/; - my ($e, $s) = ($1, $2); - - my $x = int(168 + $e * 11); - my $y; - - $x += 1 if ($e >= 11); - $x += 2 if ($e >= 15); - $x += 2 if ($e >= 15 && $e < 45 && $s > 2); - $x += 2 if ($e >= 21); - $x += 2 if ($e >= 27 && $e < 45 && $s > 2); - $x += 9 if ($e >= 29); - $x += 1 if ($e >= 31); - $x += 2 if ($e >= 35); - $x += 15 if ($e >= 45); - $x += 2 if ($e >= 51); - $x += 11 if ($e >= 61); - $x += 1 if ($e >= 67); - $x += 1 if ($e >= 71); - $x += 1 if ($e >= 75); - $x += 1 if ($e >= 81); - - if ($s > 2) { - $y = 152 + 88 - 88 * ($s-3); - } else { - $y = 357 + 88 - 88 * ($s-1); - } - - my $xx = $x + 16; - my $yy = $y + 88; - - # Justeringer - - print "insert into placements (switch, placement) values ($i, box '(($x,$y),($xx,$yy))');\n"; - $i++; -} - -print "end;\n"; |