#!/bin/bash
clear
echo
while true
do
  read -p 'Use the pinstripes system theme? (Enter yes or no, then authenticate)' answer
  case $answer in
   [yY]* )
echo
cd "$(dirname "$0")"
sudo mv -f /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras.rsrc /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/ExtrasOriginal.rsrc
sudo cp -f .Resources/Extras.rsrc /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources
sudo chown root:wheel /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras.rsrc
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
mv -f 'Use Brushed Metal System Theme (Active).command' 'Use Brushed Metal System Theme.command'
mv -f 'Use Pinstripes System Theme.command' 'Use Pinstripes System Theme (Active).command'
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Jaguar Aqua Blue.jpg"'
sudo killall loginwindow
           break;;
   [nN]* ) killall Terminal;;
   * )  echo
	echo 'Please enter yes or no to proceed.'
	echo;;
  esac
done