Skip to content

Instantly share code, notes, and snippets.

@JeffreyVdb
Last active August 29, 2015 14:03
Show Gist options
  • Save JeffreyVdb/7ac24fd97f34ef0aac3f to your computer and use it in GitHub Desktop.
Save JeffreyVdb/7ac24fd97f34ef0aac3f to your computer and use it in GitHub Desktop.
Vagrant utils
#!/bin/bash
onRemote() {
vagrant ssh -c "cd /var/www; $*"
}
cd "$(git rev-parse --show-toplevel)/www"
vagrant up --provision
npm install
bower install
grunt all
(onRemote 'composer update') &
(onRemote 'php artisan migrate:refresh --seed') &
(onRemote 'redis-cli flushdb') &
wait
echo 'All tasks were executed'
#!/bin/bash
onRemote() {
vagrant ssh -c "cd /var/www && $*"
}
cd "$(git rev-parse --show-toplevel)/www"
vagrant up --provision
npm install
bower install
grunt all
(onRemote 'composer update') &
(onRemote 'php artisan migrate && php artisan db:seed && sudo service sphinxsearch start') &
(onRemote 'redis-cli flushdb') &
wait
echo "All tasks were executed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment