Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
teddysun committed Sep 19, 2016
1 parent b805bf9 commit a9c0a5d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion shadowsocks-libev-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
Expand Down Expand Up @@ -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}
}
Expand Down
7 changes: 6 additions & 1 deletion shadowsocks-libev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
Expand Down Expand Up @@ -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}
}
Expand Down

0 comments on commit a9c0a5d

Please sign in to comment.