From 162a50a45c4a6e9cad427ad44c92d61bb5b0740b Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 5 Feb 2014 06:31:03 -0500 Subject: [PATCH] working on Epson printer installer --- pines-ubuntu.sh | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/pines-ubuntu.sh b/pines-ubuntu.sh index 02b758a..a4fe8f8 100755 --- a/pines-ubuntu.sh +++ b/pines-ubuntu.sh @@ -28,8 +28,11 @@ UBUNTU_VERSION=`lsb_release -r | cut -d':' -f2 | sed 's/\t//g'` DESKTOP="$HOME/Desktop" DE="$DESKTOP_SESSION" EPSON_URL="http://download.epson-biz.com/modules/pos/index.php?page=single_soft&cid=3839&scat=32&pcat=3&pid=36" +DOWNLOAD_DIR="$HOME/Downloads" +EPSON_TAR="tmx-cups-2.0.0.0.tar.gz" +EPSON_DIR="tmx-cups" - +DownloadExtract() { if [ ! -d "$CLIENT_DIR" ]; then wget $CLIENT_URL_BASE/$CLIENT mkdir -p "$CLIENT_DIR" @@ -41,6 +44,7 @@ if [ ! -d "$CLIENT_DIR" ]; then else echo "Client Directory Exists, skipping Download" fi +} ConfigureLubuntu() { echo "Configuring for Lubuntu..." @@ -61,11 +65,39 @@ EOF } DownloadEpson() { +clear +echo echo "This will now open a browser window where you can download" -echo "the Epson TM-V receipt printer driver" +echo "the Epson TM-V receipt printer driver. Please choose to save" +echo "the file, then close the browser to continue." sensible-browser $EPSON_URL +if [ -e $DOWNLOAD_DIR/$EPSON_TAR ]; then + cd $HOME + tar xzf $DOWNLOAD_DIR/$EPSON_TAR + cd $EPSON_DIR || { + echo "Could not change to $EPSON_DIR." + exit 1; + } + echo + echo + echo "Starting Epson installer." + if [ "$ARCH" = "i386" ]; then + echo "Choose Ubuntu 12.04 (32-bit) when prompted by the installer script." + elif [ "$ARCH" = "x86_64" ]; then + echo "Choose Ubuntu 12.04 (64-bit) when prompted by the installer script." + else + echo "System architecture not detected. Please choose Ubuntu 12.04 for" + echo "your system's architecture when prompted by the installer script" + fi + ./install.sh && echo "Epson installation complete." +else + echo "Epson driver package not downloaded to expected location." + echo "Please download and install the Epson driver manually." + exit 0; +fi } +DownloadExtract if [ "$DE" = "Lubuntu" ]; then ConfigureLubuntu fi -- 2.11.0