summaryrefslogtreecommitdiff
path: root/make-blobs
blob: 16dcb67206d24673e167a213eeafa61502375f32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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