| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. -ex |
| 2 | |
| 3 | if [scip-shell system . . `[`. "$DB" = 'pgsql' ]; then |
| 4 | echoscip-shell system . . echo. localhost:5432:postgres:postgres:postgres > ~/.pgpass |
| 5 | chmodscip-shell system . . chmod. 0600 ~/.pgpass |
| 6 | psql -w -h localhost -c 'DROP DATABASE IF EXISTS test;' -U postgres |
| 7 | psql -w -h localhost -c 'create database test;' -U postgres |
| 8 | # ~/.pgpass doesn't work apparently...whatever |
| 9 | export DBURI='postgresql+psycopg2://postgres:postgres@localhost/test' |
| 10 | fi |
| 11 | |
| 12 | if [scip-shell system . . `[`. "$DB" = 'mysql' ]; then |
| 13 | export DBURI='mysql+mysqldb://test:[email protected]/test?charset=utf8' |
| 14 | fi |
| 15 | |
| 16 | if [scip-shell system . . `[`. "$DB" = 'sqlite' ]; then |
| 17 | export DBURI='sqlite:///test.sqlite' |
| 18 | fi |