#!/bin/bash
#################################################
# DESCRIPTION: Mustek UB1200 Plus setup on Ubuntu
# DATE: 2011.10.23
# AUTHOR: ssnjara
#################################################
#navigate to proper directory
apt-get install sane xsane sane-utils -y
sudo mkdir /usr/share/sane/gt68xx
cd /usr/share/sane/gt68xx
echo "Driver firmware download directory is:"
pwd
echo "Starting downlad..."
sleep 2
#download driver firmware file sbfw.usb
wget http://data.adminsklad.ru/mustek/sbfw.usb
cd /etc/sane.d/
sleep 2
echo "Seting up /etc/sane.d/gt68xx.conf file"
#search the string in file and replace it
sudo sed -i.backup -e 's/^#override "mustek-scanexpress-1200-ub-plus"/override "mustek-scanexpress-1200-ub-plus"/' gt68xx.conf
sleep 2
echo "Device should be ready for use!"
exit;