#!/bin/bash
clear
echo
echo 'Icons by Gael Elegoet | Installer by z970'
echo
while true
do
  read -p 'Use the Platinum icon theme? (Enter yes or no, then authenticate)' answer
  case $answer in
   [yY]* )
echo
cd "$(dirname "$0")"
sudo mv -f /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources /System/Library/CoreServices/CoreTypes.bundle/Contents/Resourcesoriginal
sudo cp -rf .Resources/Resources /System/Library/CoreServices/CoreTypes.bundle/Contents
sudo chown -R root:wheel /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources
sudo mv -f /System/Library/CoreServices/Dock.app/Contents/Resources/finder.png /System/Library/CoreServices/Dock.app/Contents/Resources/finderoriginal.png
sudo mv -f /System/Library/CoreServices/Dock.app/Contents/Resources/trashempty.png /System/Library/CoreServices/Dock.app/Contents/Resources/trashemptyoriginal.png
sudo mv -f /System/Library/CoreServices/Dock.app/Contents/Resources/trashfull.png /System/Library/CoreServices/Dock.app/Contents/Resources/trashfulloriginal.png
sudo cp -f .Resources/finder.png /System/Library/CoreServices/Dock.app/Contents/Resources
sudo cp -f .Resources/trashempty.png /System/Library/CoreServices/Dock.app/Contents/Resources
sudo cp -f .Resources/trashfull.png /System/Library/CoreServices/Dock.app/Contents/Resources
sudo chown root:wheel /System/Library/CoreServices/Dock.app/Contents/Resources/finder.png
sudo chown root:wheel /System/Library/CoreServices/Dock.app/Contents/Resources/trashempty.png
sudo chown root:wheel /System/Library/CoreServices/Dock.app/Contents/Resources/trashfull.png
sudo mv -f /System/Library/CoreServices/Finder.app/Contents/Resources/burnableFolder.icns /System/Library/CoreServices/Finder.app/Contents/Resources/burnableFolderOriginal.icns
sudo mv -f /System/Library/CoreServices/Finder.app/Contents/Resources/Finder.icns /System/Library/CoreServices/Finder.app/Contents/Resources/FinderOriginal.icns
sudo mv -f /System/Library/CoreServices/Finder.app/Contents/Resources/new_folder.icns /System/Library/CoreServices/Finder.app/Contents/Resources/new_folderoriginal.icns
sudo mv -f /System/Library/CoreServices/Finder.app/Contents/Resources/SmartFolder.icns /System/Library/CoreServices/Finder.app/Contents/Resources/SmartFolderOriginal.icns
sudo mv -f /System/Library/CoreServices/Finder.app/Contents/Resources/User.icns /System/Library/CoreServices/Finder.app/Contents/Resources/UserOriginal.icns
sudo mv -f /System/Library/CoreServices/Finder.app/Contents/Resources/Group.icns /System/Library/CoreServices/Finder.app/Contents/Resources/GroupOriginal.icns
sudo mv -f /System/Library/CoreServices/Finder.app/Contents/Resources/Everyone.icns /System/Library/CoreServices/Finder.app/Contents/Resources/EveryoneOriginal.icns
sudo cp -f .Resources/burnableFolder.icns /System/Library/CoreServices/Finder.app/Contents/Resources
sudo cp -f .Resources/Resources/FinderIcon.icns /System/Library/CoreServices/Finder.app/Contents/Resources/Finder.icns
sudo cp -f .Resources/new_folder.icns /System/Library/CoreServices/Finder.app/Contents/Resources
sudo cp -f .Resources/SmartFolder.icns /System/Library/CoreServices/Finder.app/Contents/Resources
sudo cp -f /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/UserIcon.icns /System/Library/CoreServices/Finder.app/Contents/Resources/User.icns
sudo cp -f /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GroupIcon.icns /System/Library/CoreServices/Finder.app/Contents/Resources/Group.icns
sudo cp -f /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GuestUserIcon.icns /System/Library/CoreServices/Finder.app/Contents/Resources/Everyone.icns
sudo chown root:wheel /System/Library/CoreServices/Finder.app/Contents/Resources/burnableFolder.icns
sudo chown root:wheel /System/Library/CoreServices/Finder.app/Contents/Resources/Finder.icns
sudo chown root:wheel /System/Library/CoreServices/Finder.app/Contents/Resources/new_folder.icns
sudo chown root:wheel /System/Library/CoreServices/Finder.app/Contents/Resources/SmartFolder.icns
sudo chown root:wheel /System/Library/CoreServices/Finder.app/Contents/Resources/User.icns
sudo chown root:wheel /System/Library/CoreServices/Finder.app/Contents/Resources/Group.icns
sudo chown root:wheel /System/Library/CoreServices/Finder.app/Contents/Resources/Everyone.icns
sudo mv -f /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/External.icns /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/ExternalOriginal.icns
sudo mv -f /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/Internal.icns /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/InternalOriginal.icns
sudo mv -f /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/Removable.icns /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/RemovableOriginal.icns
sudo cp -f .Resources/External.icns /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/Internal.icns /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/Removable.icns /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources
sudo chown root:wheel /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/External.icns
sudo chown root:wheel /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/Internal.icns
sudo chown root:wheel /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/Removable.icns
sudo mv -f /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext/Contents/Resources/FireWireHD.icns /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext/Contents/Resources/FireWireHDOriginal.icns
sudo mv -f /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext/Contents/Resources/USBHD.icns /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext/Contents/Resources/USBHDOriginal.icns
sudo cp -f .Resources/FireWireHD.icns /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext/Contents/Resources
sudo cp -f .Resources/USBHD.icns /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext/Contents/Resources
sudo chown root:wheel /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext/Contents/Resources/FireWireHD.icns
sudo chown root:wheel /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext/Contents/Resources/USBHD.icns
sudo mv -f /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CD-R.icns /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CD-ROriginal.icns
sudo mv -f /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CD-RW.icns /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CD-RWOriginal.icns
sudo mv -f /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CD.icns /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CDOriginal.icns
sudo cp -f .Resources/CD-R.icns /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/CD-RW.icns /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/CD.icns /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources
sudo chown root:wheel /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CD-R.icns
sudo chown root:wheel /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CD-RW.icns
sudo chown root:wheel /System/Library/Extensions/IOCDStorageFamily.kext/Contents/Resources/CD.icns
sudo mv -f /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-R.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-ROriginal.icns
sudo mv -f /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-RAM.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-RAMOriginal.icns
sudo mv -f /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-RW.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-RWOriginal.icns
sudo mv -f /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVDOriginal.icns
sudo mv -f /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD+R.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD+ROriginal.icns
sudo mv -f /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD+RW.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD+RWOriginal.icns
sudo cp -f .Resources/DVD-R.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/DVD-RAM.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/DVD-RW.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/DVD.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/DVD+R.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources
sudo cp -f .Resources/DVD+RW.icns /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources
sudo chown root:wheel /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-R.icns
sudo chown root:wheel /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-RAM.icns
sudo chown root:wheel /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD-RW.icns
sudo chown root:wheel /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD.icns
sudo chown root:wheel /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD+R.icns
sudo chown root:wheel /System/Library/Extensions/IODVDStorageFamily.kext/Contents/Resources/DVD+RW.icns
sudo mv -f /System/Library/CoreServices/loginwindow.app/Contents/Resources/MacOSX.tif /System/Library/CoreServices/loginwindow.app/Contents/Resources/MacOSXOriginal.tif
sudo mv -f /System/Library/CoreServices/loginwindow.app/Contents/Resources/MacOSXServer.tif /System/Library/CoreServices/loginwindow.app/Contents/Resources/MacOSXServerOriginal.tif
sudo cp -f .Resources/MacOSX.tif /System/Library/CoreServices/loginwindow.app/Contents/Resources
sudo cp -f .Resources/MacOSXServer.tif /System/Library/CoreServices/loginwindow.app/Contents/Resources
sudo chown root:wheel /System/Library/CoreServices/loginwindow.app/Contents/Resources/MacOSX.tif
sudo chown root:wheel /System/Library/CoreServices/loginwindow.app/Contents/Resources/MacOSXServer.tif
sudo mv -f /Library/Desktop\ Pictures /Library/Desktop\ Pictures\ Original
sudo cp -rf .Resources/Desktop\ Pictures /Library
sudo cp -rf .Resources/X-Assist.app /Applications
sudo rm -rf /Library/Caches/*
defaults write ~/Library/Preferences/com.apple.Dock autohide -bool true
mv -f 'Use Platinum Icon Theme.command' 'Use Platinum Icon Theme (Active).command'
mv -f 'Use Aqua Icon Theme (Active).command' 'Use Aqua Icon Theme.command'
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Space Mist.jpg"'
sudo killall loginwindow
           break;;
   [nN]* ) killall Terminal;;
   * )  echo
	echo 'Please enter yes or no to proceed.'
	echo;;
  esac
done
