code.fastix.org

Dateiansicht:

Datei:Projekte -> Linux (Ubuntu, Debian): Mustek 1200 ub plus driver installer -> mustek_1200_ub_plus_installer.sh
md5:c1cc2d5e66fb0fdeafedd9ff6d9638d7
sha1:906c17e3053f06aeca36c8ea2f234cda90437ad7
  1. #!/usr/bin/sudo /bin/bash
  2.  
  3. startDir=$(pwd);
  4.  
  5. if [ -d '/usr/share/sane/' ]; then
  6.  
  7.         if [ ! -d '/usr/share/sane/gt68xx' ]; then
  8.                 mkdir '/usr/share/sane/gt68xx';
  9.                 chmod 755 '/usr/share/sane/gt68xx';
  10.         fi
  11.  
  12.         cd '/usr/share/sane/gt68xx';
  13.         echo 'Driver firmware download directory is:';
  14.         pwd;
  15.         echo 'Starting downlad...';
  16.         wget 'http://www.meier-geinitz.de/sane/gt68xx-backend/firmware/sbfw.usb';
  17.         chmod 644 'sbfw.usb';
  18.         cd '/etc/sane.d/';
  19.         echo "Seting up /etc/sane.d/gt68xx.conf file";
  20.         myDate=$(date '+%F_%H:%M:%S');
  21.         sed -i.backup_${myDate}  -e 's/^#override "mustek-scanexpress-1200-ub-plus"/override "mustek-scanexpress-1200-ub-plus"/' 'gt68xx.conf';
  22.         echo "Device should be ready for use!"
  23.         echo '';
  24.         sleep 3;
  25.         cd $startDir;
  26. else
  27.  
  28.         echo 'Sane is not installed. I try to install and restart:';
  29.         echo '';
  30.         apt update; apt install sane;
  31.         $0;
  32. fi