You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
655 B

10 months ago
  1. #!/usr/bin/env bash
  2. #== Import script args ==
  3. github_token=$(echo "$1")
  4. #== Bash helpers ==
  5. function info {
  6. echo " "
  7. echo "--> $1"
  8. echo " "
  9. }
  10. #== Provision script ==
  11. info "Provision-script user: `whoami`"
  12. info "Configure composer"
  13. composer config --global github-oauth.github.com ${github_token}
  14. echo "Done!"
  15. info "Install project dependencies"
  16. cd /app
  17. composer --no-progress --prefer-dist install
  18. info "Create bash-alias 'app' for vagrant user"
  19. echo 'alias app="cd /app"' | tee /home/vagrant/.bash_aliases
  20. info "Enabling colorized prompt for guest console"
  21. sed -i "s/#force_color_prompt=yes/force_color_prompt=yes/" /home/vagrant/.bashrc