#!/bin/bash
#echo $BASH_VERSION
#this script assumes ONLY that you are running this script on a ubuntu/debian based machine 12.04 LTS or higher and that run it using sudo
reset
echo "updating system..."
sudo apt-get -y update
echo "---------------------------------------------"
echo "---------------------------------------------"
echo "---------------------------------------------"
clear
echo "installing required system packages..."
sudo apt-get install -y python-software-properties python g++ make software-properties-common
echo "---------------------------------------------"
echo "---------------------------------------------"
echo "---------------------------------------------"
clear
echo "adding node ppa..."
sudo add-apt-repository -y ppa:chris-lea/node.js
echo "---------------------------------------------"
echo "---------------------------------------------"
echo "---------------------------------------------"
clear
echo "updating system again..."
sudo apt-get -y update
echo "---------------------------------------------"
echo "---------------------------------------------"
echo "---------------------------------------------"
clear
echo "installing node..."
sudo apt-get install nodejs
echo "---------------------------------------------"
echo "---------------------------------------------"
echo "---------------------------------------------"
clear
echo "installing mainframe..."
sudo npm install -g mainframe
echo "---------------------------------------------"
echo "---------------------------------------------"
echo "---------------------------------------------"
clear
echo "finished installation, running mainframe setup..."
#which mainframe 
mainframe setup 
echo "finished!"
