#!/bin/bash

poddy="poddy-1.1"

apt-get install cd-discid cdparanoia flac eject lsdvd fuse-utils fuseiso xine-ui ffmpeg lirc unzip lcdproc sun-java6-bin xawtv sudo eyeD3 lame

wget http://www.virtualworlds.de/poddy/$poddy.zip

echo ""
echo ""
echo "Please enter the name of the unix user Poddy has to be installed for:"

read user

unzip $poddy.zip -d /home/$user
rm $poddy.zip

chown -R $user /home/$user/poddy
chgrp -R $user /home/$user/poddy

echo ""
echo "Poddy is now installed in /home/$user/poddy. Next the configuration application"
echo "is started where you can set up the parameters for Poddy. If nothing happens,"
echo "please check your Java-configuration"
echo ""
echo "For executing the setup manually please go to /home/$user/poddy and start it"
echo "by calling ./setup.sh"
echo ""
echo "For more information please visit http://www.virtualworlds.de/poddy"
echo ""

cd /home/$user/poddy/
su $user -c ./setup.sh

echo ""
echo "Installation finished!"
echo ""


