#!/bin/sh
#
# This script installs the BinkJet printer driver.
#

#
# first let the user know what's going on.
#
mydir="`dirname "$0"`"

answer=`alert "Have you read and agree to the license agreement in the 'Binkjet license agreement' file?" "No" "Yes"`
if [ $answer == "No" ]; then
	alert "BinkJet printer driver install NOT done."
	exit
fi


file="$mydir"/BinkJet\ v2.5

#cp  -f -p "$file" /boot/home/config/add-ons/Print
copyattr -d "$file" /boot/home/config/add-ons/Print
mimeset -F /boot/home/config/add-ons/Print/

# Copy documentation next...

mkdir /boot/beos/documentation/BinkJet\ 2.5

mySrc="$mydir"/BinkJet\ 2.5\ documentation/BinkJet2.5.html
cp  -f -p -R "$mySrc" /boot/beos/documentation/BinkJet\ 2.5

mySrc="$mydir"/BinkJet\ 2.5\ documentation/documentation
cp  -f -p -R "$mySrc" /boot/beos/documentation/BinkJet\ 2.5

mySrc="$mydir"/BinkJet\ 2.5\ documentation/supporting-documentation
cp  -f -p -R "$mySrc" /boot/beos/documentation/BinkJet\ 2.5

mimeset -F /boot/beos/documentation/BinkJet\ 2.5

sync

/boot/beos/system/Tracker /boot/beos/documentation/BinkJet\ 2.5

alert "The BinkJet printer driver has been installed. To complete setup of the BinkJet driver go to your Preferences/Printers and hit the 'Add...' button to configure the BinkJet v2.5 driver."
