diff options
author | Skibbi <skibbipl@users.noreply.github.com> | 2021-01-04 14:36:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 09:36:40 -0500 |
commit | b4201dc7965e2a04daefad476c36b7346315d5d7 (patch) | |
tree | 419d582d933d2ac3b6085712b477161cc541f308 /packaging/installer | |
parent | 7b4ee068fa6dc5f38ae0b491fce1aed53fcaadb7 (diff) |
Qick and dirty fix for #10420 (#10424)
At least on my raspbian i do not have python but python 3. So Additional check is needed. Also this value `commit_date="9999-12-31T23:59:59Z"` is not valid for `date -d $commit_date`
Diffstat (limited to 'packaging/installer')
-rwxr-xr-x | packaging/installer/netdata-updater.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh index bc5d7b922b..5b9c611724 100755 --- a/packaging/installer/netdata-updater.sh +++ b/packaging/installer/netdata-updater.sh @@ -157,6 +157,8 @@ newer_commit_date() { commit_date="$(_safe_download "https://api.github.com/repos/netdata/netdata/commits?path=packaging%2Finstaller%2Fnetdata-updater.sh&page=1&per_page=1" /dev/stdout | jq '.[0].commit.committer.date' | tr -d '"')" elif command -v python > /dev/null 2>&1;then commit_date="$(_safe_download "https://api.github.com/repos/netdata/netdata/commits?path=packaging%2Finstaller%2Fnetdata-updater.sh&page=1&per_page=1" /dev/stdout | python -c 'from __future__ import print_function;import sys,json;print(json.load(sys.stdin)[0]["commit"]["committer"]["date"])')" + elif command -v python3 > /dev/null 2>&1;then + commit_date="$(_safe_download "https://api.github.com/repos/netdata/netdata/commits?path=packaging%2Finstaller%2Fnetdata-updater.sh&page=1&per_page=1" /dev/stdout | python3 -c 'from __future__ import print_function;import sys,json;print(json.load(sys.stdin)[0]["commit"]["committer"]["date"])')" fi if [ -z "${commit_date}" ] ; then |