#!/bin/bash

# This is a single command to enable DVD playback on any version of ubuntu desktop.

################################################################################
#
# This script distributed free of charge by HildoerSystems.com
#
# This script comes with no warranty or guarantee. Please review the script
# before you run it to ensure that it will not cause adverse effects on your
# system.
#
# If you have any questions or comments, please e-mail: Anthony@HildoerSystems.com
#
################################################################################

ubuntuDistro=`lsb_release -a 2>&1 | grep Codename | sed 's/\s*//g' | cut -d: -f2`

echo
echo Adding Medibuntu Repository for $ubuntuDistro

sudo wget http://www.medibuntu.org/sources.list.d/$ubuntuDistro.list -O /etc/apt/sources.list.d/medibuntu.list
sudo wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
sudo aptitude update 
sudo aptitude -y install medibuntu-keyring 
sudo aptitude update
sudo aptitude -y dist-upgrade

echo 
echo Installing DVD plugins and tools
sudo aptitude -y install totem-xine libdvdnav4 libdvdcss2 libdvdread3
sudo aptitude -y purge totem-gstreamer

echo
echo
echo All Done. Now Reboot.

