X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=test%2Fbin%2Finstall-fixtures.sh;fp=test%2Fbin%2Finstall-fixtures.sh;h=88e444174bbc52d0df5abde38d5b9556847bb028;hp=0000000000000000000000000000000000000000;hb=030f4945fe72265177bd5620141b363b3cddeefb;hpb=ea30b6a9eba0741c16f5fa434925011f8a7a237f diff --git a/test/bin/install-fixtures.sh b/test/bin/install-fixtures.sh new file mode 100755 index 0000000..88e4441 --- /dev/null +++ b/test/bin/install-fixtures.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# This script installs the test fixtures into the default databases on +# localhost assuming everything is configured just right. Don't worry +# about this, go play with something else. +# +rm -rf /tmp/mailshears-test +mkdir -p /tmp/mailshears-test/example.com/alice +mkdir -p /tmp/mailshears-test/example.com/booger +mkdir -p /tmp/mailshears-test/example.com/jeremy +mkdir -p /tmp/mailshears-test/example.net/adam + +dropdb --if-exists -U postgres agendav +createdb -U postgres agendav +psql -U postgres -d agendav < test/sql/agendav.sql +psql -U postgres -d agendav < test/sql/agendav-fixtures.sql + +dropdb --if-exists -U postgres davical +createdb -U postgres davical +psql -U postgres -d davical < test/sql/davical.sql +psql -U postgres -d davical < test/sql/davical-fixtures.sql + +dropdb --if-exists -U postgres postfixadmin +createdb -U postgres postfixadmin +psql -U postgres -d postfixadmin < test/sql/postfixadmin.sql +psql -U postgres -d postfixadmin < test/sql/postfixadmin-fixtures.sql + +dropdb --if-exists -U postgres roundcube +createdb -U postgres roundcube +psql -U postgres -d roundcube < test/sql/roundcube.sql +psql -U postgres -d roundcube < test/sql/roundcube-fixtures.sql