Last active
December 21, 2015 04:48
-
-
Save rponte/6251800 to your computer and use it in GitHub Desktop.
Shell script to install and configure all dependencies for running Tubaina on Ubuntu Server
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 | |
######################## | |
# Tubaina dependencies # | |
######################## | |
# The latest source code can be found at https://gist.github.com/rponte/6251800 | |
set -e # Exit script immediately on first error. | |
#set -x # Print commands and their arguments as they are executed. | |
# Check if Tubaina environment is already installed | |
RUN_ONCE_FLAG=~/tubaina_env_build_time | |
if [ -e "$RUN_ONCE_FLAG" ]; then | |
echo "Tubaina environment is already installed." | |
exit 0 | |
fi | |
# Update Ubuntu package index | |
sudo apt-get update -y | |
# Installs required dependencies | |
sudo apt-get install -y openjdk-7-jdk | |
sudo apt-get install -y texlive-latex-extra | |
sudo apt-get install -y python | |
sudo apt-get install -y python-setuptools | |
sudo easy_install virtualenv | |
sudo easy_install Pygments==1.5 | |
# Installs basic dependencies | |
sudo apt-get install -y unzip git ant | |
# Installs Gradle so that you can build Tubaina project if you need | |
GRADLE_PKG='gradle-1.6-all.zip' | |
cd /tmp | |
wget http://services.gradle.org/distributions/$GRADLE_PKG | |
cd $HOME | |
unzip -o /tmp/$GRADLE_PKG | |
echo 'export GRADLE_HOME=~/gradle-1.6' >> ~/.bash_profile | |
echo 'export PATH=$GRADLE_HOME/bin:$PATH' >> ~/.bash_profile | |
# Configures prompt color | |
sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/g' ~/.bashrc | |
echo 'source ~/.bashrc' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Cleaning unneeded packages | |
sudo apt-get autoremove -y | |
sudo apt-get clean | |
# sets "run once" flag | |
date > $RUN_ONCE_FLAG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment