update comment
This commit is contained in:
parent
b805bf9bd4
commit
a9c0a5dea0
|
|
@ -36,6 +36,12 @@ get_ip(){
|
||||||
}
|
}
|
||||||
|
|
||||||
get_latest_version(){
|
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)
|
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
|
[ -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')"
|
shadowsocks_libev_ver="shadowsocks-libev-$(echo ${ver} | sed -e 's/^[a-zA-Z]//g')"
|
||||||
|
|
@ -177,7 +183,7 @@ pre_install(){
|
||||||
# Update System
|
# Update System
|
||||||
apt-get -y update
|
apt-get -y update
|
||||||
# Install necessary dependencies
|
# 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
|
echo
|
||||||
cd ${cur_dir}
|
cd ${cur_dir}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ get_ip(){
|
||||||
}
|
}
|
||||||
|
|
||||||
get_latest_version(){
|
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)
|
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
|
[ -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')"
|
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"
|
echo "Press any key to start...or press Ctrl+C to cancel"
|
||||||
char=`get_char`
|
char=`get_char`
|
||||||
#Install necessary dependencies
|
#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
|
echo
|
||||||
cd ${cur_dir}
|
cd ${cur_dir}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user