Version variables relocated to in variables.sh.

pull/55/head
Joe Prochazka 2016-01-08 11:17:22 -05:00
rodzic 33a7ad15c5
commit 327bff4722
5 zmienionych plików z 68 dodań i 32 usunięć

Wyświetl plik

@ -31,11 +31,15 @@
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## VARIABLES
BUILDDIR=$PWD
ADSBEXCHANGEDIR="$PWD/adsbexchange"
ADSBEXCHANGEDIR="$BUILDDIR/adsbexchange"
source ../bash/functions.sh
## INFORMATIVE MESSAAGE ABOUT THIS SOFTWARE
clear
echo -e "\033[31m"

Wyświetl plik

@ -31,19 +31,16 @@
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Set to the most current stable version of PiAware available.
CURRENTVERSION="2.1-5-jessie"
# This next line was added temporarily due to the fact the version of PiAware containing a certificate
# error fix is still pacakaged with the version number 2.1-5. This should be able to be removed once
# PiAware's versioning matches back up with that of the tag being used to build the packages.
CURRENTVERSIONNAME="2.1-5"
## VAARIABLES
BUILDDIR=${PWD}
PIAWAREDIR="$PWD/piaware_builder"
source ../bash/variables.sh
source ../bash/functions.sh
## INFORMATIVE MESSAGE ABOUT THIS SOFTWARE
clear
echo -e "\033[31m"
@ -103,7 +100,7 @@ else
echo -e "\033[37m"
git clone https://github.com/flightaware/piaware_builder.git
cd $PIAWAREDIR
git checkout tags/v${CURRENTVERSION}
git checkout ${PIAWAREBRANCH}
fi
## BUILD THE PIAWARE PACKAGE
@ -120,12 +117,7 @@ dpkg-buildpackage -b
echo -e "\033[33m"
echo "Installing the PiAware package..."
echo -e "\033[37m"
### TEMPORARY FIX #########################################################################
# READ THE COMMENT PERTAINING TO THE VARIABLE CURRENTVERSIONNAME AT THE TOP OF THE SCRIPT #
###########################################################################################
#sudo dpkg -i $BUILDDIR/piaware_builder/piaware_${CURRENTVERSION}_*.deb
sudo dpkg -i $PIAWAREDIR/piaware_${CURRENTVERSIONNAME}_*.deb
sudo dpkg -i $PIAWAREDIR/piaware_${PIAWAREVERSION}_*.deb
## CHECK THAT THE PACKAGE INSTALLED

Wyświetl plik

@ -31,15 +31,15 @@
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## VARIABLES
BUILDDIR=$PWD
## DECLARE THE CURRENT VERSIONS OF THE SOFTWARE
ARMVERSION="3.1.201"
I386VERSION="3.0.2080"
source ../bash/variables.sh
source ../bash/functions.sh
## INFORMATIVE MESSAGE ABOUT THIS SOFTWARE
clear
echo -e "\033[31m"
@ -81,9 +81,9 @@ echo -e "\033[33m"
echo "Downloading the Plane Finder ADS-B Client package..."
echo -e "\033[37m"
if [[ `uname -m` == "armv7l" ]]; then
wget http://client.planefinder.net/pfclient_${ARMVERSION}_armhf.deb -O $BUILDDIR/pfclient_${ARMVERSION}_armhf.deb
wget http://client.planefinder.net/pfclient_${PFCLIENTVERSIONARM}_armhf.deb -O $BUILDDIR/pfclient_${PFCLIENTVERSIONARM}_armhf.deb
else
wget http://client.planefinder.net/pfclient_${I386VERSION}_i386.deb -O $BUILDDIR/pfclient_${I386VERSION}_i386.deb
wget http://client.planefinder.net/pfclient_${PFCLIENTVERSIONI386}_i386.deb -O $BUILDDIR/pfclient_${PFCLIENTVERSIONI386}_i386.deb
fi
## INSTALL THE PLANEFINDER ADS-B CLIENT PACKAGE
@ -92,13 +92,13 @@ echo -e "\033[33m"
echo "Installing the Plane Finder ADS-B Client package..."
echo -e "\033[37m"
if [[ `uname -m` == "armv7l" ]]; then
sudo dpkg -i $BUILDDIR/pfclient_${ARMVERSION}_armhf.deb
sudo dpkg -i $BUILDDIR/pfclient_${PFCLIENTVERSIONARM}_armhf.deb
else
if [[ `lsb_release -si` == "Debian" ]]; then
# Force architecture if this is Debian.
sudo dpkg -i --force-architecture $BUILDDIR/pfclient_${I386VERSION}_i386.deb
sudo dpkg -i --force-architecture $BUILDDIR/pfclient_${PFCLIENTVERSIONI386}_i386.deb
else
sudo dpkg -i $BUILDDIR/pfclient_${I386VERSION}_i386.deb
sudo dpkg -i $BUILDDIR/pfclient_${PFCLIENTVERSIONI386}_i386.deb
fi
fi

42
bash/variables.sh 100644
Wyświetl plik

@ -0,0 +1,42 @@
#!/bin/bash
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# This script is not meant to be executed directly. #
# Instead execute install.sh to begin the installation process. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## SOFTWARE VERSIONS
# FlightAware PiAware
PIAWAREVERSION="2.1-5"
PIAWAREBRANCH="5c77c4924"
# PlaneFinder ADS-B Client
PFCLIENTVERSIONARM="3.1.201"
PFCLIENTVERSIONI386="3.0.2080"

Wyświetl plik

@ -34,19 +34,17 @@
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
##############
## VARIABLES
PIAWAREVERSION="2.1-5-jessie"
PFCLIENTI386VERSION="3.1.201"
PFCLIENTARMVERSION="3.0.2080"
BASEDIR=${PWD}
BASHDIR="$BASEDIR/bash"
BUILDDIR="$BASEDIR/build"
source $BASHDIR/variables.sh
source $BASHDIR/functions.sh
## FUNCTIONS
# Download the latest package lists for enabled repositories and PPAs.
function AptUpdate() {
clear
@ -302,12 +300,12 @@ if [ $(dpkg-query -W -f='${STATUS}' pfclient 2>/dev/null | grep -c "ok installed
FEEDERLIST=("${FEEDERLIST[@]}" 'Plane Finder ADS-B Client' '' OFF)
else
# Set version depending on the device architecture.
PFCLIENTVERSION=$PFCLIENTARMVERSION
PFCLIENTVERSION=$PFCLIENTVERSIONARM
## The i386 version even though labeled as 3.1.201 is in fact reported as 3.0.2080.
## So for now we will skip the architecture check and use the ARM version variable for both.
#if [[ `uname -m` != "armv7l" ]]; then
# PFCLIENTVERSION=$PFCLIENTI386VERSION
# PFCLIENTVERSION=$PFCLIENTVERSIONI386
#fi
# Check if a newer version can be installed.