#!/bin/bash
# written by Andrew Schott
# Credits -- fedorafaq.org fedoraforums.org fedoraproject.org redhat.com google.com

clear

#############################################
## Quick Notification of disabled sections ##
#############################################
while true; do
  echo "NOTE: This will make many changes to your system."
  echo "Please take caution in using this script."
  echo "If you are unaware of what this script does,"
  echo "please open it in a text editor and view it prior to using."
  echo "Potentially dangerous sections require your user input to proceed."
  echo 
  echo "Credits:"
  echo "Google, FedoraForum, FedoraFaq, Red Hat, Fedora Project,"
  echo "leigh123linux, GNU/Linux contributors"
  echo
  echo "Please hit <ENTER> to continue."
  read -n 1 keypress
  if [ "$keypress" == "" ]; then
    break
  fi
  sleep 1
done


#######################
## Setup Repos First ##
#######################

## Rpmfusion ##
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

## Google ##
touch /etc/yum.repos.d/google64.repo
echo "[google64]
name=Google - x86_64
baseurl=http://dl.google.com/linux/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
" >> /etc/yum.repos.d/google64.repo

## Fedora-Chromium ##
wget -O /etc/yum.repos.d/fedora-chromium.repo http://repos.fedorapeople.org/repos/spot/chromium/fedora-chromium.repo

## Leigh's Adobe Flash for x64 ##
echo "Install Leigh's x64 Adobe Flash repository?"
echo "This will uninstall "flash-plugin" and "nspluginwrapper". [y/n]"
read leigh_query
case "$leigh_query" in
  "y" | "Y" )
    yum erase flash-plugin nspluginwrapper* 
    rpm -Uvh http://www.linux-ati-drivers.homecall.co.uk/flashplayer.x86_64/flash-release-1-2.noarch.rpm
    ;;
  "n" | "N" )
    echo "Not installing Leigh's x64 Flash Driver"
    ;;
esac


## Adobe ## Disabled for now
echo "Install the official Adobe Flash Repository (i686)? [y/n]"
read adobe_query
case "$adobe_query" in
  "y" | "Y" )
    rpm -Uvh http://linuxdownload.adobe.com/adobe-release/adobe-release-1.0-0.noarch.rpm
    ;;
  "n" | "N" )
    echo "Not installing Adobe Flash Repository (i686)"
    ;;
esac
    
####################
## Update system  ##
####################
yum -y update


###########################
## Install some software ##
###########################
yum -y install pulseaudio*.i686 alsa-plugins-*.i686 libcurl.i686 evince totem-mozplugin ntfs-3g totem-xine xine-lib-extras-freeworld totem-backend xine gstreamer-plugins* alsa-plugins-pulseaudio control-center-extra ntfs-config ccsm system-config* openoffice.org-core openoffice.org-{base,impress,writer,calc} chromium wine*.i686


