#!/bin/bash
#

echo -n "Creating /tmp/ubuntulite for install logs . . ."
sleep 1
mkdir /tmp/ubuntulite
cd /tmp/ubuntulite
echo "[OK]"

echo -n "Testing if your version is supported . . . "
sleep 1
if test $(lsb_release -cs) = "hardy"
then
echo "[OK]"
sleep 1
echo -n "Installing ubuntulite-repository_0.1-0ubuntulite1_all.deb . . ."
sleep 1
wget -q http://ppa.launchpad.net/ubuntulite/ubuntu/pool/main/u/ubuntulite-repository/ubuntulite-repository_0.1-0ubuntulite1_all.deb
dpkg -i ubuntulite-repository_0.1-0ubuntulite1_all.deb > repo_log
echo "[OK]"
else
echo "[FAILED]"
exit 1
fi

echo -n "Updating APT package information . . . "
sleep 1
apt-get -y --force-yes update > update_log
echo "[OK]"

echo -n "Updating base packages before installing Ubuntulite . . . "
sleep 1
apt-get -y --force-yes upgrade > upgrade_log
echo "[OK]"

echo -n "Installing Ubuntulite default packages . . . "
sleep 1
apt-get -y --force-yes install ubuntulite-desktop > install_log
echo "[OK]"

echo "Reboot to complete the process."

