*.txt: Fix Debian wheezy/jessie version checks

Found some checks that assumed all Debian was wheezy, and also a bunch
of use of cut assuming that there will never be a Debian version higher
than 9.0.  Let's just futureproof that code right now.  This closes #56
and uses the method described therein anywhere -c 1 is used now.  For
the checks against -c 1-2, we still use -d . -f 1 as described in the
issue, but modify the following conditionals to test for just the
numeric, without the decimal.
This commit is contained in:
T. Joseph Carter
2016-01-30 03:25:27 -08:00
parent cd8271cd56
commit cd20570999
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ isRpi=
[[ -f /usr/bin/raspi-config ]] && isRpi=1
isDebian=
lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ ( -f /etc/debian_version ) && ( $(cut -c 1 < /etc/debian_version) -ge "7" ) ]] && isDebian=1
lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ ( -f /etc/debian_version ) && ( $(cut -d . -f 1 < /etc/debian_version) -ge "7" ) ]] && isDebian=1
if [ -f /usr/local/etc/A2SERVER-version ]; then
installedVersion="$(cat /usr/local/etc/A2SERVER-version)"