aboutsummaryrefslogtreecommitdiffstats
path: root/examples/historical/tools/make-dummy-placement.sh
blob: 192e3d380cac1d8c60bf50cd43be8f8bf9c9d7f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
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