bootstrap.sh 931 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. #
  3. # This script will bootstrap a local Ubuntu system, installing dependencies and preparing it for
  4. # pybot development.
  5. if [ "$(id -u)" -ne 0 ]; then
  6. echo "Error, please execute this script as root."
  7. exit
  8. else
  9. echo "Bootstrapping system..."
  10. apt-get update
  11. debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
  12. debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
  13. apt-get -qy install python-pip python2.7 python2.7-dev mysql-server mysql-client libmysqlclient-dev
  14. pip install -r /vagrant/requirements.txt
  15. echo "Bootstrap finished!"
  16. echo
  17. echo "Please note, mysql was installed with a default root password of 'root'."
  18. echo "You really should change this password immediately."
  19. echo "To do this, please run the following command and follow the prompts: "
  20. echo
  21. echo "sudo mysqladmin -u root -p password"
  22. echo
  23. exit
  24. fi