Skip to content

Instantly share code, notes, and snippets.

@saxenap
Last active August 29, 2015 14:19
Show Gist options
  • Save saxenap/3df6305113a640743485 to your computer and use it in GitHub Desktop.
Save saxenap/3df6305113a640743485 to your computer and use it in GitHub Desktop.
Install Jekyll
#!/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