PageRenderTime 25ms CodeModel.GetById 20ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/vagrant/provision/once-as-vagrant.sh

https://bitbucket.org/kanishevv/ofnvrsk
Shell | 38 lines | 22 code | 12 blank | 4 comment | 2 complexity | a95ec36b94d91774f7008be2789de62b MD5 | raw file
 1#!/usr/bin/env bash
 2
 3#== Import script args ==
 4
 5github_token=$(echo "$1")
 6
 7#== Bash helpers ==
 8
 9function info {
10  echo " "
11  echo "--> $1"
12  echo " "
13}
14
15#== Provision script ==
16
17info "Provision-script user: `whoami`"
18
19info "Configure composer"
20composer config --global github-oauth.github.com ${github_token}
21echo "Done!"
22
23info "Install project dependencies"
24cd /app
25composer --no-progress --prefer-dist install
26
27info "Init project"
28./init --env=Development --overwrite=y
29
30info "Apply migrations"
31./yii migrate --interactive=0
32./yii_test migrate --interactive=0
33
34info "Create bash-alias 'app' for vagrant user"
35echo 'alias app="cd /app"' | tee /home/vagrant/.bash_aliases
36
37info "Enabling colorized prompt for guest console"
38sed -i "s/#force_color_prompt=yes/force_color_prompt=yes/" /home/vagrant/.bashrc