summaryrefslogtreecommitdiff
path: root/make-blobs
diff options
context:
space:
mode:
authorwiki <wiki@proton.parabola.nu>2016-08-02 21:10:30 +0100
committerwiki <wiki@proton.parabola.nu>2016-08-02 21:10:30 +0100
commitd386934962c15a79703588812dc5815f32d70cbf (patch)
tree1251b086744a5305855c107eacbcf3e96005ab6e /make-blobs
parenta5f917bbc55e295896b8084f6657eb8b6abaf8a8 (diff)
files were sitting here on productionemulatorman/master
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