mirror of
https://github.com/RasppleII/a2server.git
synced 2026-04-24 08:17:26 +00:00
*.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:
+1
-1
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user