#!/bin/sh

scanner_driver_list=" \
	epson-ep_scan \
	hp-hpscanpbm \
	microtek-mtekscan \
	mustek-mscan \
	mustek-scanimage \
"

echo "Please select your scanner-driver set."
select scanner_driver in $scanner_driver_list ; do
    echo "#!/bin/sh
# the next line restarts using wish \\
exec wish \"\$0\" \"\$@\"" > tkscan

    tkscan_files="
	README GUIDE $scanner_driver tkscan-conf \
	window-main window-pref window-option window-help \
	tkscan-lib tkscan-scan output-main output-ieditor \
        output-file output-printer output-fax output-ocr \
        tkscan-init
    "
    echo ""
    echo "Generating tkscan..."
    for i in $tkscan_files
    do
        echo "    Adding $i.tcl"
        cat $i.tcl >> tkscan
    done
    echo "# End of tkscan" >> tkscan
    echo "Generating tkscan...Done"
    echo "Making tkscan executable"
    chmod a+rx tkscan
    echo ""
    echo "Finished. Now copy \`tkscan' where you want to put it."
    echo ""
    exit
done

