Skip to content

Instantly share code, notes, and snippets.

@Coornail
Last active December 28, 2015 15:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Coornail/7524973 to your computer and use it in GitHub Desktop.
Save Coornail/7524973 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
DEBIAN_PACKAGES="
apache2 \
curl \
default-jre-headless \
git \
python-pip
python-typogrify \
unzip \
"
# Set hungarian mirror.
cat /etc/apt/sources.list | sed -e 's/http:\/\/us./http:\/\/hu./g' > /tmp/sources.list
sudo cp /tmp/sources.list /etc/apt/
# Install packages.
apt-get update && apt-get install -y $DEBIAN_PACKAGES
pip install smartypants --upgrade
# Install clojure compiler.
cd /tmp/
wget http://dl.google.com/closure-compiler/compiler-20131014.zip
unzip compiler-latest.zip
sudo chmod +r compiler.jar
cd /tmp/
wget "http://htmlcompressor.googlecode.com/files/htmlcompressor-1.5.3.jar"
sudo chmod +r compiler.jar
# Install ruby 1.9.3
curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
source /usr/local/rvm/scripts/rvm
rvm rubygems latest
gem install bundler
cd /octopress_data/octopress
bundle install
gem install kramdown
# Compile blog.
cd /octopress_data/octopress
./compile.sh
# Link output to webroot.
rm -rf /var/www
ln -s /octopress_data/octopress/public/ /var/www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment