a few new scripts. grid land lister does a dump of the uuids and such for land on...
authorChris Koeritz <fred@gruntose.com>
Sun, 18 Sep 2016 00:07:05 +0000 (20:07 -0400)
committerChris Koeritz <fred@gruntose.com>
Sun, 18 Sep 2016 00:07:05 +0000 (20:07 -0400)
scripts/opensim/grid_land_lister.sh [new file with mode: 0644]
scripts/system/list_old_linux_packages.sh [new file with mode: 0644]
scripts/unit_test/rounder.sh [new file with mode: 0644]

diff --git a/scripts/opensim/grid_land_lister.sh b/scripts/opensim/grid_land_lister.sh
new file mode 100644 (file)
index 0000000..a4909e3
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# creates a file with the information about land on the
+# simulator.
+
+#hmmm: need to abstract the gridroot user, the output file name
+#(although support a default), and the database name.
+
+mysql -u gridroot -p > $HOME/dump_of_opensim_land_table.txt <<eof
+use wildmutt_opensim;
+select RegionUUID,Name,Description,OwnerUUID from land;
+eof
+
diff --git a/scripts/system/list_old_linux_packages.sh b/scripts/system/list_old_linux_packages.sh
new file mode 100644 (file)
index 0000000..caa957c
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+bash $FEISTY_MEOW_SCRIPTS/system/list_packages.sh linux-image |grep "^rc" | grep -v extra | awk '{print $2 }'
+
+bash $FEISTY_MEOW_SCRIPTS/system/list_packages.sh linux-header |grep "^rc" | grep -v extra | awk '{print $2 }'
+
+
+
diff --git a/scripts/unit_test/rounder.sh b/scripts/unit_test/rounder.sh
new file mode 100644 (file)
index 0000000..3214ee6
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# sample the first argument to make sure it's not empty.
+# we can't know if the command is really valid or not, but it at least
+# needs to not be empty.
+test_to_run="$1"
+
+if [ -z "$test_to_run" ]; then
+  echo "This script requires a test or program to run as the first parameter."
+  exit 1
+fi
+
+trashdir="$(mktemp -d "$TMP/rounder.XXXXXX")"
+
+echo "Running command: $*"
+echo "Storing log files in: $trashdir"
+
+round=0
+while true; do
+  round=$((round+1))
+  echo ============================
+  echo round $round commencing
+  outputfile="$trashdir/run_round_${round}.log"
+echo real cmd:
+echo "${@}" 
+  eval "${@}" 2>&1 | tee $outputfile
+  if [ ${PIPESTATUS[0]} -ne 0 ]; then
+    echo FAILURE IN RUN $round
+    break
+  fi
+  echo round $round successful.
+done 
+