#!/bin/sh
# This is a comment

cd /
cd $HOME
cd 'Library'
cd 'Application Support'

if [ -d 'Microsoft' ]; then
	cd 'Microsoft'
else 
	mkdir 'Microsoft'
	cd 'Microsoft'
fi 

if [ -d 'Silverlight' ]; then
	cd 'Silverlight'
else 
	mkdir 'Silverlight'
	cd 'Silverlight'
fi 

if [ -d 'OutOfBrowser' ]; then
	cd 'OutOfBrowser'
else 
	mkdir 'OutOfBrowser'
	cd 'OutOfBrowser'
fi 

# This is the path to the Xap and other associated files copied by the installer
cp -R -f /tmp/pbp/606015063.localhost .
#cp -rf /tmp/pbp/606015063.localhost .

if [ -d 'index' ]; then
	cd 'index'
else 
	mkdir 'index'
	cd 'index'
fi 

# This is the index file for the domain that goes in the index folder
#### mv -f /tmp/asi770 .

#/$HOME/Library/Application Support/Microsoft/Silverlight/OutOfBrowser/

file="/Library/Internet Plug-Ins/Silverlight.plugin"
if [ -f "$file" ]
then
echo "$file found."
else
echo "$file not found."
sudo installer -pkg '/tmp/pbp/tmp/Silverlight.pkg' -target /
fi
