#/bin/bash
# Copyright (c) 2006 klaus zuo
# License: GPLv2
# Author: klaus zuo
# Blog: http://feeds.feedburner.com/klauszuo
echo -e "\n\nDo not run this with sudo! Passwords will be asked for when needed.\n\n"
[ $USER = root ] && exit 0
sources="/etc/apt/sources.list"
echo "Backup old repositories..."
sudo cp $sources /etc/apt/sources.list.`date +%Y-%m-%d-%H-%M-%S`
echo -n "Are you using china telecom ? (yes / no)"
read option
case $option in
yes|y)
echo "Replace Repositories..."
wget -c http://files.myopera.com/klauszuo/linux/sources-cn99.list
sudo mv sources-cn99.list /etc/apt/sources.list
;;
*)
echo "Replace Repositories..."
wget -c http://files.myopera.com/klauszuo/linux/sources.list
sudo mv sources.list /etc/apt/sources.list
;;
esac
echo "Update system..."
sudo apt-get update
sudo apt-get dist-upgrade -y --force-yes
echo "Install media-support..."
sudo apt-get install gstreamer0.10-pitfdll gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse w32codecs libxine-extracodecs libdvdcss2 libdvdnav4 libdvdplay0 libdvdread3 -y --force-yes
echo -n "Will you want to chat with googletalk via voice? (yes / no) "
read option
case $option in
yes|y)
sudo apt-get install tapioca0.3 tapiocaui0.3 -y --force-yes
echo "ok."
;;
*)
echo "skip.."
;;
esac
echo -n "Are you using kubuntu? (yes / no) "
read option
case $option in
yes|y)
echo "Install and set up chinese support and videoplayer.... "
sudo apt-get install language-pack-kde-zh language-pack-zh kchmviewer mplayer kmplayer -y --force-yes
ln -s /usr/share/fonts/truetype/arphic/uming.ttf ~/.mplayer/subfont.ttf
echo "Install some tools....."
sudo apt-get install kget -y --force-yes
;;
*)
echo "Install and set up chinese support and videoplayer.... "
sudo apt-get install language-pack-gnome-zh language-pack-zh chmviewer mplayer -y --force-yes
echo "Install some tools....."
sudo apt-get install gwget -y --force-yes
;;
esac
echo "uninstall mozilla..."
sudo apt-get remove mozilla-firefox mozilla-thunderbird
echo "success uninstalled."
echo -n "will you install programm from source? (yes / no) "
read option
case $option in
yes|y)
echo "install build-essential"
sudo apt-get install build-essential -y --force-yes
;;
*)
echo "skip..."
;;
esac
echo "install sth. useful..."
sudo apt-get install opera gimp amule p7zip unrar -y --force-yes
im-switch -s scim_xim
echo -e "done\nrecommand to reboot your computer now\n\n"
echo -n "do you wanna reboot your computer now? (yes / no) "
read option
case $option in
yes|y)
echo "now reboot"
sudo reboot
;;
*)
echo "make reboot yourself..."
;;
esac
-