#!/bin/sh
### BEGIN INIT INFO
# Description:       Provide a develop enviroment for C, QT 4.8 and include QWT library
#                    kernel ACPI events.
#Licence:             GPL 3.0
### END INIT INFO
cd /tmp

OPT=0
while [ “$OPT” != “3” ]
do
clear
echo “\tDIRECTORY OPERATION MENU”
echo “\t========================================”
echo “\t0. Install build-essential”
echo “\t1. Install QT environment, ljacklm and QT Serial”
echo “\t2. Install QWT library”
echo “\t3. Exit”
echo “\t========================================”
echo “\tEnter choice  :”
read OPT
case $OPT in
“0”)
date=$(date “+%Y-%m-%d.%T”)
echo “Operation begin $date”
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential git
date=$(date “+%Y-%m-%d.%T”)
echo “Operation finish $date”
sleep 3
;;
“1”)
date=$(date “+%Y-%m-%d.%T”)
echo “Operation begin $date”
sudo    apt-get    install    qt4-default    libudev-dev    qt4-dev-tools
wget    https://sourceforge.net/projects/qspd/files/latest/download
#mv    0B1YXUFW28NHsdjZ2Ny1BSTdFNjA\?e\=download    qtserial.tar.gz
tar    xzvf    qtserial.tar.gz
mkdir    qtserialport-build
cd    qtserialport-build/
qmake    ../qtserialport/qtserialport.pro
make
sudo    make    install
date=$(date “+%Y-%m-%d.%T”)
sudo    apt-get    install    libusb-dev
sudo    apt-get    install    libusb
sudo    apt-get    install    libusb-1.0-0-dev
git    clone    https://github.com/labjack/exodriver.git
cd    exodriver/
sudo    ./install.sh
cd    ..
wget    https://labjack.com/sites/default/files/software/ljacklm.zip
unzip    ljacklm.zip
cd    ljacklm/libljacklm
make
sudo    make    install
echo “Operation finish $date”
sleep 3
;;
“2”)
date=$(date “+%Y-%m-%d.%T”)
echo “Operation begin $date”
wget http://iweb.dl.sourceforge.net/project/qwt/qwt/6.1.2/qwt-6.1.2.tar.bz2
tar -xjvf qwt-6.1.2.tar.bz2
cd qwt-6.1.2
qmake qwt.pro
make
sudo make install
sudo ln -s /usr/local/qwt-6.1.2/lib/libqwt.so.6.1.2 /usr/lib/libqwt.so.6
sudo ln -s /usr/local/qwt-6.1.2/lib/libqwt.so.6.1.2 /usr/lib/libqwt.so.6.1
sudo ln -s /usr/local/qwt-6.1.2/lib/libqwt.so.6.1.2 /usr/lib/libqwt.so.6.1.2
sudo ln -s /usr/local/qwt-6.1.2/lib/libqwt.so.6.1.2 /usr/lib/libqwt.so
echo “Operation finish $date”
sleep 3
;;
“3”) return;;
*) echo “\n\t\t\t\tInvalid Input”
echo “\t\t\t\tPress <Enter> key to continue…\c”
read OPT;;
esac
done

return 0

Anuncios