From d1fb3c07d5fa16618b025db109f39a30558ab6d0 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Tue, 4 Feb 2014 22:21:36 -0500 Subject: [PATCH] adding nascent lubuntu/ubuntu staff client installation script --- pines-ubuntu.sh | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 pines-ubuntu.sh diff --git a/pines-ubuntu.sh b/pines-ubuntu.sh new file mode 100755 index 0000000..96cd7df --- /dev/null +++ b/pines-ubuntu.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +# Copyright (C) 2014 Georgia Public Library Service +# Chris Sharp . +# +# A program to install and configure the Evergreen Staff Client on Ubuntu Linux. + +# http://gapines.org/updates/clients/2.5.1pines.0_i686.tar.bz2 +WORKDIR=`pwd` +ARCH=`uname -p` +CLIENT="2.5.1pines.0_$ARCH.tar.bz2" +CLIENT_URL_BASE="http://gapines.org/updates/clients" +CLIENT_DIR="$HOME/Evergreen_Staff_Client" +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" + + +if [ ! -d "$CLIENT_DIR" ]; then + wget $CLIENT_URL_BASE/$CLIENT + mkdir -p "$CLIENT_DIR" + cd $CLIENT_DIR || { + echo "Could not change to $CLIENT_DIR." + exit 1; +} + tar xjf $WORKDIR/$CLIENT +else + echo "Client Directory Exists, skipping Download" +fi + +ConfigureLubuntu() { +sudo apt-get update && sudo apt-get -y install imagemagick +convert $CLIENT_DIR/evergreen.ico $CLIENT_DIR/evergreen.png +cat < $DESKTOP/Evergreen +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=Evergreen Staff Client +Name[en_US]=Evergreen Staff Client +Icon=$CLIENT_DIR/evergreen-0.png +Exec=$CLIENT_DIR/evergreen +Comment[en_US]=Evergreen Staff Client +StartupNotify=false +EOF +} + +DownloadEpson() { +echo "This will now open a browser window where you can download" +echo "the Epson TM-V receipt printer driver" +sensible-browser $EPSON_URL +} + +if [ "$DE" = "Lubuntu" ]; then + ConfigureLubuntu +fi + +DownloadEpson -- 2.11.0