diff options
Diffstat (limited to 'maintenance/storage/make-blobs')
-rwxr-xr-x | maintenance/storage/make-blobs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/maintenance/storage/make-blobs b/maintenance/storage/make-blobs index 9eb7e83e..36cf9ced 100755 --- a/maintenance/storage/make-blobs +++ b/maintenance/storage/make-blobs @@ -1,11 +1,16 @@ #!/bin/bash -if [ X$2 == X ];then - echo 'Usage: make-blobs <server> <db>' +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 && \ -mysql -u wikiadmin -p`wikiadmin_pass` -h $1 $2 < blobs.sql +sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin -p`wikiadmin_pass` -h $1 $2 |