From a9c0a5dea0d77b519d5d773d1171d666a19e039a Mon Sep 17 00:00:00 2001 From: Teddysun Date: Mon, 19 Sep 2016 18:42:43 +0900 Subject: [PATCH] update comment --- shadowsocks-libev-debian.sh | 8 +++++++- shadowsocks-libev.sh | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/shadowsocks-libev-debian.sh b/shadowsocks-libev-debian.sh index dc0f308..b7f17bb 100644 --- a/shadowsocks-libev-debian.sh +++ b/shadowsocks-libev-debian.sh @@ -36,6 +36,12 @@ get_ip(){ } get_latest_version(){ + check_installed "curl" + if [ $? -eq 1 ]; then + echo "curl command not found, try to install it" + apt-get -y update + apt-get -y --no-install-recommends install curl + fi ver=$(curl -s 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')" @@ -177,7 +183,7 @@ pre_install(){ # Update System apt-get -y update # Install necessary dependencies - apt-get -y --no-install-recommends install curl build-essential autoconf libtool openssl libssl-dev zlib1g-dev xmlto asciidoc libpcre3 libpcre3-dev + apt-get -y --no-install-recommends install build-essential autoconf libtool openssl libssl-dev zlib1g-dev xmlto asciidoc libpcre3 libpcre3-dev echo cd ${cur_dir} } diff --git a/shadowsocks-libev.sh b/shadowsocks-libev.sh index 4563534..394637a 100644 --- a/shadowsocks-libev.sh +++ b/shadowsocks-libev.sh @@ -36,6 +36,11 @@ get_ip(){ } get_latest_version(){ + check_installed "curl" + if [ $? -eq 1 ]; then + echo "curl command not found, try to install it" + yum -y install curl + fi ver=$(curl -s 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')" @@ -206,7 +211,7 @@ pre_install(){ echo "Press any key to start...or press Ctrl+C to cancel" char=`get_char` #Install necessary dependencies - yum install -y unzip autoconf automake make zlib-devel curl curl-devel libtool libevent xmlto asciidoc pcre pcre-devel openssl-devel gcc perl perl-devel cpio expat-devel gettext-devel + yum install -y unzip autoconf automake make zlib-devel curl-devel libtool libevent xmlto asciidoc pcre pcre-devel openssl-devel gcc perl perl-devel cpio expat-devel gettext-devel echo cd ${cur_dir} }