update get latest version

This commit is contained in:
Teddysun 2017-02-22 09:07:33 +09:00
parent 638f666b52
commit 169527214f

4
bbr.sh
View File

@ -4,7 +4,7 @@
#
# System Required: CentOS 6+, Debian7+, Ubuntu12+
#
# Copyright (C) 2016 Teddysun <i@teddysun.com>
# Copyright (C) 2016-2017 Teddysun <i@teddysun.com>
#
# URL: https://teddysun.com/489.html
#
@ -36,7 +36,7 @@ fi
get_latest_version() {
latest_version=$(wget -qO- http://kernel.ubuntu.com/~kernel-ppa/mainline/ | awk -F'\"v' '/v[4-9].[0-9].[0-9]/{print $2}' | cut -d/ -f1 | sort -V | tail -1)
latest_version=$(wget -qO- http://kernel.ubuntu.com/~kernel-ppa/mainline/ | awk -F'\"v' '/v[4-9]./{print $2}' | cut -d/ -f1 | grep -v - | sort -V | tail -1)
if [[ `getconf WORD_BIT` == "32" && `getconf LONG_BIT` == "64" ]]; then
deb_name=$(wget -qO- http://kernel.ubuntu.com/~kernel-ppa/mainline/v${latest_version}/ | grep "linux-image" | grep "generic" | awk -F'\">' '/amd64.deb/{print $2}' | cut -d'<' -f1 | head -1)