aboutsummaryrefslogtreecommitdiffstats
path: root/tools/make-dummy-placement.sh
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2015-04-05 10:40:01 +0200
committerKristian Lyngstol <kristian@bohemians.org>2015-04-05 10:40:01 +0200
commitd596165ea5a110d4e043cbc2775ce888cfd6ae84 (patch)
tree6b850d7bbeec9e5d0c5dd5fd6808637d7b9790cf /tools/make-dummy-placement.sh
parentc7cfa3768c6428acfcc2ee5331133f46275c6940 (diff)
tg15 cleanup
Diffstat (limited to 'tools/make-dummy-placement.sh')
-rwxr-xr-xtools/make-dummy-placement.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/make-dummy-placement.sh b/tools/make-dummy-placement.sh
new file mode 100755
index 0000000..192e3d3
--- /dev/null
+++ b/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