diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-02-26 13:05:31 +0000 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-02-26 13:05:31 +0000 |
commit | 885156ee6a26ed047bba3f90541eaab92b65d758 (patch) | |
tree | e8a70cd6bca09641efac0c64c4c20d27efab2bda /examples/historical/tools/make-dummy-placement.sh | |
parent | c6997a4810e09619e9018c91d163f3f38b17212c (diff) | |
parent | 3dae75bde90aecc0cef2e3496f3565dcb3eeec0c (diff) |
Merge branch 'master' of github.com:tech-server/tgmanage
Diffstat (limited to 'examples/historical/tools/make-dummy-placement.sh')
-rwxr-xr-x | examples/historical/tools/make-dummy-placement.sh | 12 |
1 files changed, 12 insertions, 0 deletions
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 |