Merge remote-tracking branch 'upstream/4.3' into 4.3-master-2013-05-24-02-32-04
[civicrm-core.git] / tools / scripts / demo / load-pristine-drupal
CommitLineData
68ba3174
DS
1#!/usr/bin/env /bin/bash
2
3source `dirname $0`/demo.conf
4
5pushd .
6
7# load drupal demo pristines
8if [ $DRUPAL_DEMO_CRM_DBNAME ]; then
9 mysqladmin -f drop $DRUPAL_DEMO_CRM_DBNAME
10 echo "Creating civicrm-drupal-demo db.."
11 mysqladmin create $DRUPAL_DEMO_CRM_DBNAME
12 if [ -f $DRUPAL_DEMO_CRM_PRISTINE ]; then
13 echo "Reloading civicrm-drupal-demo db from pristine.."
14 mysql $DRUPAL_DEMO_CRM_DBNAME < $DRUPAL_DEMO_CRM_PRISTINE
15 fi
16fi
17
18if [ $DRUPAL_DEMO_CMS_DBNAME ]; then
19 mysqladmin -f drop $DRUPAL_DEMO_CMS_DBNAME
20 echo "Creating drupal-demo db.."
21 mysqladmin create $DRUPAL_DEMO_CMS_DBNAME
22 if [ -f $DRUPAL_DEMO_CMS_PRISTINE ]; then
23 echo "Reloading drupal-demo db from pristine.."
24 mysql $DRUPAL_DEMO_CMS_DBNAME < $DRUPAL_DEMO_CMS_PRISTINE
25 fi
26fi
27
28popd