Last active
August 29, 2015 14:19
-
-
Save saxenap/3df6305113a640743485 to your computer and use it in GitHub Desktop.
Install Jekyll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# To run: | |
# rm -rf install-jekyll && wget -O install-jekyll https://gist.githubusercontent.com/saxenap/3df6305113a640743485/raw && chmod 777 install-jekyll && ./install-jekyll | |
set -o errexit | |
function exit_if_not_installed | |
{ | |
RED='\033[01;31m' | |
RESET='\033[00;00m' | |
MESSAGE="Error: Missing required package $1" | |
if ! yum list installed $1 >/dev/null 2>&1; then echo -e "${RED}${MESSAGE}${RESET}"; exit 1; fi | |
} | |
exit_if_not_installed "ruby*-devel" | |
exit_if_not_installed "rubygems*" | |
exit_if_not_installed "nodejs" | |
# Required by nokogiri | |
sudo yum install libxslt-devel | |
sudo yum -y install git | |
sudo gem install jekyll | |
cd /usr/bin && ln -sf /usr/local/bin/jekyll jekyll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment