home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 August - Disc 1 / PCNET_CD_2006_08_1.iso / linux / puppy-barebones-2.01r2.iso / pup_201.sfs / usr / sbin / scannerwizard.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2003-11-28  |  5.5 KB  |  172 lines

  1. #!/bin/sh
  2. #Scanner Wizard (c) Barry Kauler 2003 www.goosee.com/puppy
  3.  
  4. #SCRIPT NOT FINISHED
  5.  
  6. #this script creates /etc/scanner, which has format driver[:device].
  7. #note, we could also have /dev/scanner linked to device.
  8.  
  9. #display window with driver info...
  10. #dillo "file:///usr/share/doc/sane/sane-backends.htm" &
  11. dillo "http://www.mostang.com/sane/sane-backends.html" &
  12. sleep 1
  13.  
  14. STATUSabaton="off"
  15. STATUSagfafocus="off"
  16. STATUSapple="off"
  17. STATUSartec="off"
  18. STATUSartec_eplus48u="off"
  19. STATUSas6e="off"
  20. STATUSavision="off"
  21. STATUSbh="off"
  22. STATUScanon="off"
  23. STATUScanon630u="off"
  24. STATUScanon_pp="off"
  25. STATUScoolscan="off"
  26. STATUScoolscan2="off"
  27. STATUSepson="off"
  28. STATUSfujitsu="off"
  29. STATUSgt68xx="off"
  30. STATUShp="off"
  31. STATUShpsj5s="off"
  32. STATUSibm="off"
  33. STATUSleo="off"
  34. STATUSma1509="off"
  35. STATUSmatsushita="off"
  36. STATUSmicrotek="off"
  37. STATUSmicrotek2="off"
  38. STATUSmustek="off"
  39. STATUSmustek_pp="off"
  40. STATUSmustek_usb="off"
  41. STATUSnec="off"
  42. STATUSpie="off"
  43. STATUSplustek="off"
  44. STATUSricoh="off"
  45. STATUSs9036="off"
  46. STATUSsceptre="off"
  47. STATUSsharp="off"
  48. STATUSsm3600="off"
  49. STATUSsnapscan="off"
  50. STATUSsp15c="off"
  51. STATUSst400="off"
  52. STATUStamarack="off"
  53. STATUSteco1="off"
  54. STATUSteco2="off"
  55. STATUSteco3="off"
  56. STATUSumax="off"
  57. STATUSumax1220u="off"
  58. STATUSumax_pp="off"
  59.  
  60. if [ -e /etc/scanner ];then
  61.  #/etc/scanner may have a format of drive:device...
  62.  CURRENTSCANNER="`cat /etc/scanner | cut -f 1 -d ":"`"
  63. # STATUS$CURRENTSCANNER="on"
  64. case "$CURRENTSCANNER" in
  65.  abaton ) STATUSabaton="on" ;;
  66.  agfafocus ) STATUSagfafocus="on" ;;
  67.  apple ) STATUSapple="on" ;;
  68.  artec ) STATUSartec="on" ;;
  69.  artec_eplus48u ) STATUSartec_eplus48u="on" ;;
  70.  as6e ) STATUSas6e="on" ;;
  71.  avision ) STATUSavision="on" ;;
  72.  bh ) STATUSbh="on" ;;
  73.  canon ) STATUScanon="on" ;;
  74.  canon630u ) STATUScanon630u="on" ;;
  75.  canon_pp ) STATUScanon_pp="on" ;;
  76.  coolscan ) STATUScoolscan="on" ;;
  77.  coolscan2 ) STATUScoolscan2="on" ;;
  78.  epson ) STATUSepson="on" ;;
  79.  fujitsu ) STATUSfujitsu="on" ;;
  80.  gt68xx ) STATUSgt68xx="on" ;;
  81.  hp ) STATUShp="on" ;;
  82.  hpsj5s ) STATUShpsj5s="on" ;;
  83.  ibm ) STATUSibm="on" ;;
  84.  leo ) STATUSleo="on" ;;
  85.  ma1509 ) STATUSma1509="on" ;;
  86.  matsushita ) STATUSmatsushita="on" ;;
  87.  microtek ) STATUSmicrotek="on" ;;
  88.  microtek2 ) STATUSmicrotek2="on" ;;
  89.  mustek ) STATUSmustek="on" ;;
  90.  mustek_pp ) STATUSmustek_pp="on" ;;
  91.  mustek_usb ) STATUSmustek_usb="on" ;;
  92.  nec ) STATUSnec="on" ;;
  93.  pie ) STATUSpie="on" ;;
  94.  plustek ) STATUSplustek="on" ;;
  95.  ricoh ) STATUSricoh="on" ;;
  96.  s9036 ) STATUSs9036="on" ;;
  97.  sceptre ) STATUSsceptre="on" ;;
  98.  sharp ) STATUSsharp="on" ;;
  99.  sm3600 ) STATUSsm3600="on" ;;
  100.  snapscan ) STATUSsnapscan="on" ;;
  101.  sp15c ) STATUSsp15c="on" ;;
  102.  st400 ) STATUSst400="on" ;;
  103.  tamarack ) STATUStamarack="on" ;;
  104.  teco1 ) STATUSteco1="on" ;;
  105.  teco2 ) STATUSteco2="on" ;;
  106.  teco3 ) STATUSteco3="on" ;;
  107.  umax ) STATUSumax="on" ;;
  108.  umax1220u ) STATUSumax1220u="on" ;;
  109.  umax_pp ) STATUSumax_pp="on" ;;
  110. esac
  111. fi
  112.  
  113. RESULTOK="`Xdialog --wmclass "scannerwizard" --title "Puppy scanner wizard" --stdout \
  114.  --radiolist "Read doc window then choose scanner driver..." 28 65 4 \
  115.  "abaton" "Abaton" $STATUSabaton \
  116.  "agfafocus"   "Agfa, Siemens"   $STATUSagfafocus   \
  117.  "apple"  "Apple" $STATUSapple  \
  118.  "artec"   "Artec/Ultima, BlackWidow,Plustek"   $STATUSartec   \
  119.  "artec_eplus48u"  "Artec/Ultima, Medion(etc),Trust,Memorex,Umax" $STATUSartec_eplus48u \
  120.  "as6e" "Artec/Ultima" $STATUSas6e \
  121.  "avision" "Avision, HP,Minolta,Mitsubishi,Fujitsu" $STATUSavision \
  122.  "bh" "Bell and Howell" $STATUSbh \
  123.  "canon" "Canon" $STATUScanon \
  124.  "canon630u" "Canon" $STATUScanon630u \
  125.  "canon_pp" "Canon" $STATUScanon_pp \
  126.  "coolscan" "Nikon" $STATUScoolscan \
  127.  "coolscan2" "Nikon" $STATUScoolscan2 \
  128.  "epson" "Epson" $STATUSepson \
  129.  "fujitsu" "Fujitsu" $STATUSfujitsu \
  130.  "gt68xx" "Mustek, Plustek,Artec,Boeder,PkdBell,Medion,Trust,Lexmark,Genius" $STATUSgt68xx \
  131.  "hp" "Hewlett Packard, Photosmart/scanner" $STATUShp \
  132.  "hpsj5s" "Hewlett Packard" $STATUShpsj5s \
  133.  "ibm" "IBM, Ricoh" $STATUSibm \
  134.  "leo" "LEO, Across Technologies, Genius" $STATUSleo \
  135.  "ma1509" "Mustek" $STATUSma1509 \
  136.  "matsushita" "Panasonic" $STATUSmatsushita \
  137.  "microtek" "Microtek, Agfa" $STATUSmicrotek \
  138.  "microtek2" "Microtek, Vobis,Scanport" $STATUSmicrotek2 \
  139.  "mustek" "Mustek, Trust,Primax" $STATUSmustek \
  140.  "mustek_pp" "Mustek, Medion(etc),Targa,Trust,Viviscan,Cybercom,Gallery" $STATUSmustek_pp \
  141.  "mustek_usb" "Mustek, Trust" $STATUSmustek_usb \
  142.  "nec" "NEC" $STATUSnec \
  143.  "pie" "PIE, Devcom,Adlib" $STATUSpie \
  144.  "plustek" "Plustek, Primax,Genius,Aries,B-Scan,Mustek,HP,Epson,Umax,Compaq,Canon" $STATUSplustek \
  145.  "ricoh" "Ricoh" $STATUSricoh \
  146.  "s9036" "Siemens" $STATUSs9036 \
  147.  "sceptre" "Sceptre, Komodo" $STATUSsceptre \
  148.  "sharp" "Sharp" $STATUSsharp \
  149.  "sm3600" "Microtek" $STATUSsm3600 \
  150.  "snapscan" "Agfa, Benq,Guillemot,Mitsubishi,Epson" $STATUSsnapscan \
  151.  "sp15c" "Fijitsu" $STATUSsp15c \
  152.  "st400" "Siemens" $STATUSst400 \
  153.  "tamarack" "Tamarack" $STATUStamarack \
  154.  "teco1" "Relisys, Actown,Dextra" $STATUSteco1 \
  155.  "teco2" "Relisys, Primax" $STATUSteco2 \
  156.  "teco3" "Relisys, Plustek,Piotech,Trust" $STATUSteco3 \
  157.  "umax" "Umax, Linotype Hell,Vobis,Edge,Epson,Escom,Escort,Genius,Nikon" $STATUSumax \
  158.  "umax1220u" "Umax" $STATUSumax1220u \
  159.  "umax_pp" "Umax" $STATUSumax_pp  2> /dev/null`"
  160.  
  161. STATUSRET=$?
  162.  
  163. if [ $STATUSRET -eq 0 ];then
  164.  echo -n "$RESULTOK" > /etc/scanner
  165. # Xdialog --wmclass "scannerwizard" --title "Puppy scanner wizard" \
  166. # --infobox "NOTE: Your choice will only take effect after rebooting" \
  167. # 8 50 10000 2> /dev/null
  168.  Xdialog --wmclass "scannerwizard" --title "Puppy scanner wizard" \
  169.  --infobox "SCRIPT NOT FINISHED. DOESN'T ACTUALLY DO ANYTHING!" \
  170.  8 50 10000 2> /dev/null
  171. fi
  172.