From e6fd0035555499fa186845f4c69b715e9ad246b9 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Fri, 26 Feb 2016 11:29:20 +0100 Subject: More cleanup and adding add_switches.txt.pl add_switches.txt.pl is not quite done yet --- examples/historical/tools/make-dummy-placement.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 examples/historical/tools/make-dummy-placement.sh (limited to 'examples/historical/tools/make-dummy-placement.sh') diff --git a/examples/historical/tools/make-dummy-placement.sh b/examples/historical/tools/make-dummy-placement.sh new file mode 100755 index 0000000..192e3d3 --- /dev/null +++ b/examples/historical/tools/make-dummy-placement.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Generate a random placement-entry insert for a named switch (convenient +# if you manually add a switch with no placement) + +for a in $* ; do +X=$(( $RANDOM % 500 )) +Y=$(( $RANDOM % 500 )) +X1=$(( $X + 20 )) +Y1=$(( $Y + 130 )) +echo "insert into placements select switch, box '(($X,$Y),($X1,$Y1))' from switches where sysname = '$a';" +done -- cgit v1.2.3