From df360001d3a8d6e482f5031758efc75499739aea Mon Sep 17 00:00:00 2001 From: Teddysun Date: Fri, 24 Feb 2017 22:46:32 +0900 Subject: [PATCH] update shadowsocks-libev version auto get latest version Signed-off-by: Teddysun --- shadowsocks-all.sh | 5 +---- shadowsocks-libev-debian.sh | 4 +--- shadowsocks-libev.sh | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/shadowsocks-all.sh b/shadowsocks-all.sh index 35508ec..ce4fa88 100644 --- a/shadowsocks-all.sh +++ b/shadowsocks-all.sh @@ -146,9 +146,7 @@ get_ipv6(){ } get_libev_ver(){ - #libev_ver=$(wget --no-check-certificate -qO- https://api.github.com/repos/shadowsocks/shadowsocks-libev/releases/latest | grep 'tag_name' | cut -d\" -f4) - # The specified version - libev_ver="v3.0.2" + libev_ver=$(wget --no-check-certificate -qO- https://api.github.com/repos/shadowsocks/shadowsocks-libev/releases/latest | grep 'tag_name' | cut -d\" -f4) [ -z ${libev_ver} ] && echo "${red}Error:${plain} Get shadowsocks-libev latest version failed" && exit 1 } @@ -387,7 +385,6 @@ install_dependencies() { for depend in ${yum_depends[@]}; do error_detect_depends "yum -y install ${depend}" done - [ -f /usr/include/libev/ev.h ] && ln -sf /usr/include/libev/ev.h /usr/include/ev.h elif check_sys packageManager apt; then apt_depends=( gettext build-essential unzip gzip python python-dev python-pip python-m2crypto curl openssl libssl-dev diff --git a/shadowsocks-libev-debian.sh b/shadowsocks-libev-debian.sh index eb00221..3ba01a9 100644 --- a/shadowsocks-libev-debian.sh +++ b/shadowsocks-libev-debian.sh @@ -61,9 +61,7 @@ get_char(){ } get_latest_version(){ - #ver=$(wget --no-check-certificate -qO- https://api.github.com/repos/shadowsocks/shadowsocks-libev/releases/latest | grep 'tag_name' | cut -d\" -f4) - # The specified version - ver="v3.0.2" + ver=$(wget --no-check-certificate -qO- https://api.github.com/repos/shadowsocks/shadowsocks-libev/releases/latest | grep 'tag_name' | cut -d\" -f4) [ -z ${ver} ] && echo "Error: Get shadowsocks-libev latest version failed" && exit 1 shadowsocks_libev_ver="shadowsocks-libev-$(echo ${ver} | sed -e 's/^[a-zA-Z]//g')" download_link="https://github.com/shadowsocks/shadowsocks-libev/releases/download/${ver}/${shadowsocks_libev_ver}.tar.gz" diff --git a/shadowsocks-libev.sh b/shadowsocks-libev.sh index cffda20..de347fd 100644 --- a/shadowsocks-libev.sh +++ b/shadowsocks-libev.sh @@ -58,9 +58,7 @@ get_char(){ } get_latest_version(){ - #ver=$(wget --no-check-certificate -qO- https://api.github.com/repos/shadowsocks/shadowsocks-libev/releases/latest | grep 'tag_name' | cut -d\" -f4) - # The specified version - ver="v3.0.2" + ver=$(wget --no-check-certificate -qO- https://api.github.com/repos/shadowsocks/shadowsocks-libev/releases/latest | grep 'tag_name' | cut -d\" -f4) [ -z ${ver} ] && echo "Error: Get shadowsocks-libev latest version failed" && exit 1 shadowsocks_libev_ver="shadowsocks-libev-$(echo ${ver} | sed -e 's/^[a-zA-Z]//g')" download_link="https://github.com/shadowsocks/shadowsocks-libev/releases/download/${ver}/${shadowsocks_libev_ver}.tar.gz" @@ -249,7 +247,6 @@ pre_install(){ yum install -y epel-release yum install -y gcc gettext-devel unzip autoconf automake make zlib-devel libtool xmlto asciidoc udns-devel libev-devel yum install -y pcre pcre-devel perl perl-devel cpio expat-devel openssl-devel mbedtls-devel - [ -f /usr/include/libev/ev.h ] && ln -sf /usr/include/libev/ev.h /usr/include/ev.h } # Download latest shadowsocks-libev