diff options
author | nachoparker <nacho@ownyourbits.com> | 2019-07-25 02:13:11 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-07-25 02:26:05 +0300 |
commit | e30271f96f5c162b5c32ec41aa7987ae66bce62c (patch) | |
tree | aeb6d999e9f98d82e90c80e461f5a9b80066e6c8 /etc | |
parent | 2fb7225d28cbac6d124533eb0cbc5ada0ccb731f (diff) |
armbian: fix distro check
Signed-off-by: nachoparker <nacho@ownyourbits.com>
Diffstat (limited to 'etc')
-rw-r--r-- | etc/library.sh | 7 | ||||
-rw-r--r-- | etc/ncp.cfg | 6 |
2 files changed, 3 insertions, 10 deletions
diff --git a/etc/library.sh b/etc/library.sh index 3ddd4c7f..b6a13c69 100644 --- a/etc/library.sh +++ b/etc/library.sh @@ -273,11 +273,8 @@ function is_more_recent_than() function check_distro() { local cfg="${1:-$NCPCFG}" - local len="$(jq '.release_issue | length' < "$cfg")" - for i in $(seq 0 $((len-1))); do - local supported=$(jq -r .release_issue[$i] < "$cfg") - grep -q "$supported" /etc/issue && return 0 - done + local supported=$(jq -r .release < "$cfg") + grep -q "$supported" <(lsb_release -sc) && return 0 return 1 } diff --git a/etc/ncp.cfg b/etc/ncp.cfg index 5adf74ae..c72d92c8 100644 --- a/etc/ncp.cfg +++ b/etc/ncp.cfg @@ -1,9 +1,5 @@ { "nextcloud_version": "16.0.3", "php_version": "7.3", - "release": "buster", - "release_issue": [ - "Debian GNU/Linux 10", - "Raspbian GNU/Linux 10" - ] + "release": "buster" } |