install.sh 553 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # this script is based on : https://jekyllrb.com/docs/installation/ubuntu/
  3. # Run this script as root
  4. if [ "$EUID" -ne 0 ]
  5. then echo "Please run as root"
  6. exit
  7. fi
  8. # Update && Upgrade
  9. apt-get update && apt-get upgrade -y
  10. # Install dependecies
  11. apt-get install ruby-full build-essential zlib1g-dev
  12. # Add ruby to ~/.baschrc
  13. echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
  14. echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
  15. echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
  16. source ~/.bashrc
  17. # Install Jekyll
  18. gem install jekyll bundler