summaryrefslogtreecommitdiffstats
path: root/support/schema/reloadtestdb.sh
diff options
context:
space:
mode:
authoreric <eric>2004-07-13 00:12:42 +0200
committereric <eric>2004-07-13 00:12:42 +0200
commitcbe2050420a65349a5fcf1f4cce6e7c76490f881 (patch)
tree167ebed2b4b7ab322a2c2492d6b2e688f4ca2fe6 /support/schema/reloadtestdb.sh
parent7b9956f225cd885c861db0cb145b16b3b8441ca7 (diff)
downloadaur-cbe2050420a65349a5fcf1f4cce6e7c76490f881.tar.gz
aur-cbe2050420a65349a5fcf1f4cce6e7c76490f881.tar.xz
started on the package submit script
Diffstat (limited to 'support/schema/reloadtestdb.sh')
-rwxr-xr-xsupport/schema/reloadtestdb.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/support/schema/reloadtestdb.sh b/support/schema/reloadtestdb.sh
new file mode 100755
index 00000000..53ddf867
--- /dev/null
+++ b/support/schema/reloadtestdb.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+mydir=`pwd`
+if [ `basename $mydir` != "schema" ]; then
+ echo "you must be in the aur/support/schema directory to run this script"
+ exit
+fi
+
+echo "dropping old database..."
+yes | mysqladmin -uaur -paur drop AUR
+
+echo "recreating database..."
+mysqladmin -uaur -paur create AUR
+
+echo "recreating tables..."
+mysql -uaur -paur AUR < ./aur-schema.sql
+
+echo "loading dummy-data..."
+bzcat ./dummy-data.sql.bz2 | mysql -uaur -paur AUR
+
+echo "done."
+exit
+