summaryrefslogtreecommitdiff
path: root/maintenance/storage/make-blobs
blob: 36cf9cedf9e0050daab1bebd9012a65ab0915a3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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