Skip to content

Instantly share code, notes, and snippets.

@MKorostoff
Created April 9, 2015 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MKorostoff/e5a5412023831db41ae1 to your computer and use it in GitHub Desktop.
Save MKorostoff/e5a5412023831db41ae1 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# @author Matt Korostoff <mkorostoff@gmail.com>
#
# @internal
#
# @category
#
# @copyright Licensed under the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version. http://www.gnu.org/licenses/
#Install site
sudo rm /Users/matt/Sites/nbcsports.local/docroot/sites/default/settings.php
cd /Users/matt/Sites/nbcsports.local/docroot
sudo drush si nbcs -y --site-name='NBC Sports (dev)' --account-name=admin --account-pass=redacted --db-url=mysql://root@127.0.0.1:3306/nbcsports
#Import videos
drush eval "if(function_exists('nbcs_video_on_demand_import_videos')) { nbcs_video_on_demand_import_videos(); }"
#Run tests
cd /Users/matt/Sites/nbcsports.local/tests/behat
sudo vendor/bin/behat
##Login
cd /Users/matt/Sites/nbcsports.local/docroot
drush en -y auto_login_url
url=$(drush eval "print auto_login_url_create(1, 'node', 1);" | sed 's/default/nbcsports.local:9999/g')
open -a "/Applications/Google Chrome.app" "${url}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment