adding nascent lubuntu/ubuntu staff client installation script
authorChris Sharp <csharp@georgialibraries.org>
Wed, 5 Feb 2014 03:21:36 +0000 (22:21 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 5 Feb 2014 03:21:36 +0000 (22:21 -0500)
pines-ubuntu.sh [new file with mode: 0755]

diff --git a/pines-ubuntu.sh b/pines-ubuntu.sh
new file mode 100755 (executable)
index 0000000..96cd7df
--- /dev/null
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+# Copyright (C) 2014 Georgia Public Library Service
+# Chris Sharp <csharp@georgialibraries.org
+#    
+#    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 3 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, see <http://www.gnu.org/licenses/>.
+#
+# 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 <<EOF > $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