summaryrefslogtreecommitdiff
path: root/make-blobs
diff options
context:
space:
mode:
Diffstat (limited to 'make-blobs')
-rw-r--r--make-blobs14
1 files changed, 14 insertions, 0 deletions
diff --git a/make-blobs b/make-blobs
new file mode 100644
index 00000000..16dcb672
--- /dev/null
+++ b/make-blobs
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+if [ -z $2 ];then
+ echo 'Usage: make-blobs <server> <db> [<table name>]'
+ exit 1
+fi
+if [ -z $3 ]; then
+ table=blobs
+else
+ table=$3
+fi
+
+echo "CREATE DATABASE $2" | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 && \
+sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 $2