#/bin/sh # iP3300.sh - v1.0 - 2007-12-30 # Installationsskript für Canon Pixma iP3300 Drucker unter Debian # Script for installation of Canon iP3300 printers under Debian #*************************************************************************** # Copyright (C) 2007-2008 by Vinzenz Vietzke # vinz@v1nz.de / http://www.v1nz.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation # 51 Franklin Street, Fifth Floor # Boston, MA 02110-1301 USA #*************************************************************************** printf 'Prüfe Systemsprache / Checking system language...\n' syslang=`printenv LANG` case $syslang in de*) printf 'Systemsprache '"$syslang"'\n\n'; if test $( id | awk -F'[=(]' '{print $2}'; ) -eq "0"; then printf 'LOS GEHTS!\nDu bist root - alles klar!\n'; mkdir -v /tmp/iP3300 printf 'Installiere benötigte Pakete mit APT-GET...\n' apt-get -qq update apt-get -qq install libxml1 libglade0 libpng3 libtiff4 && apt-get -qq install alien wget cd /tmp/iP3300/ clear printf 'Hole Treiber als RPM-Pakete von www.v1nz.de...\n' wget -v http://www.v1nz.de/downloads/ip3300/cnijfilter-common-2.70-1.i386.rpm wget -v http://www.v1nz.de/downloads/ip3300/cnijfilter-ip3300-2.70-1.i386.rpm clear printf 'Konvertiere RPMs mit alien ins Debian DEB-Format...\n' alien -d cnijfilter-common-2.70-1.i386.rpm alien -d --scripts cnijfilter-ip3300-2.70-1.i386.rpm clear printf 'Installiere konvertierte DEB-Pakete...\n' dpkg -i cnijfilter-common_2.70-2_i386.deb && dpkg -i cnijfilter-ip3300_2.70-2_i386.deb clear printf 'Setze Symlinks...\n' cd /usr/local/bin ldd cifip3300 cd /usr/lib ln -s libtiff.so.4 libtiff.so.3 ldconfig clear printf 'Hole vorkonfigurierte PPD-Datei von www.v1nz.de...\n' cd /tmp/iP3300 wget -v http://www.v1nz.de/downloads/ip3300/canonip3300.ppd clear printf 'Kopiere vorkonfigurierte PPD-Datei in das CUPS-Verzeichnis...\n' mkdir /usr/share/cups/model mv -v /tmp/iP3300/canonip3300.ppd /usr/share/cups/model/ clear printf 'Lösche Installationsdaten...\n' cd .. rm -Rfv iP3300/ clear printf 'FERTIG!\nTreiber für Canon Pixma iP3300 erfolgreich installiert.\nDer Drucker kann nun aktiviert und genutzt werden!\n\nViel Spaß!\n' else printf $USER', du benötigst root-Rechte um den Treiber zu installieren!\nVerwende "su root" oder "sudo su" um dieser zu bekommen!\n'; fi ;; !=de*) printf 'System language '"$syslang"'\n\n'; if test $( id | awk -F'[=(]' '{print $2}'; ) -eq "0"; then printf 'LETS GO!\nYou are root - everything allright!\n'; mkdir -v /tmp/iP3300 printf 'Installing needed packages via APT-GET...\n' apt-get -qq update apt-get -qq install libxml1 libglade0 libpng3 libtiff4 && apt-get -qq install alien wget cd /tmp/iP3300/ clear printf 'Fetching RPM-packaged driver from www.v1nz.de...\n' wget -v http://www.v1nz.de/downloads/ip3300/cnijfilter-common-2.70-1.i386.rpm wget -v http://www.v1nz.de/downloads/ip3300/cnijfilter-ip3300-2.70-1.i386.rpm clear printf 'Converting RPMs to Debian DEB-format using alien...\n' alien -d cnijfilter-common-2.70-1.i386.rpm alien -d --scripts cnijfilter-ip3300-2.70-1.i386.rpm clear printf 'Installing converted DEB packages...\n' dpkg -i cnijfilter-common_2.70-2_i386.deb && dpkg -i cnijfilter-ip3300_2.70-2_i386.deb clear printf 'Setting symlinks...\n' cd /usr/local/bin ldd cifip3300 cd /usr/lib ln -s libtiff.so.4 libtiff.so.3 ldconfig clear printf 'Fetching preconfigured PPD file from www.v1nz.de...\n' cd /tmp/iP3300 wget -v http://www.v1nz.de/downloads/ip3300/canonip3300.ppd clear printf 'Copying preconfigured PPD file to CUPS folder...\n' mkdir /usr/share/cups/model mv -v /tmp/iP3300/canonip3300.ppd /usr/share/cups/model/ clear printf 'Deleting installation data...\n' cd .. rm -Rfv iP3300/ clear printf 'DONE!\nDriver for Canon Pixma iP3300 successfully installed.\nThe Printer may now be activated and used!\n\nHave fun!\n' else clear && printf $USER', you need root-rights for installing the driver!\n\nUse "su root" or "sudo su" for getting them!\n'; fi ;; esac