From 770240e2247abbf351409bc1bd9cf615575242c6 Mon Sep 17 00:00:00 2001 From: Yuk1n0 <39364985+Yuk1n0@users.noreply.github.com> Date: Sat, 10 Jul 2021 18:25:26 +0800 Subject: [PATCH] Remove useless function --- shadowsocks.sh | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/shadowsocks.sh b/shadowsocks.sh index a701ae4..bbd0bbe 100644 --- a/shadowsocks.sh +++ b/shadowsocks.sh @@ -157,11 +157,6 @@ check_sys() { fi } -# autoconf_version -version_ge() { - test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1" -} - # centosversion getversion() { if [[ -s /etc/redhat-release ]]; then @@ -208,24 +203,6 @@ debianversion() { fi } -autoconf_version() { - if [ ! "$(command -v autoconf)" ]; then - echo -e "[${green}Info${plain}] Starting install package autoconf" - if check_sys packageManager yum; then - yum install -y autoconf >/dev/null 2>&1 || echo -e "[${red}Error:${plain}] Failed to install autoconf" - elif check_sys packageManager apt; then - apt -y update >/dev/null 2>&1 - apt -y install autoconf >/dev/null 2>&1 || echo -e "[${red}Error:${plain}] Failed to install autoconf" - fi - fi - local autoconf_ver=$(autoconf --version | grep autoconf | grep -oE "[0-9.]+") - if version_ge ${autoconf_ver} 2.67; then - return 0 - else - return 1 - fi -} - get_ip() { local IP=$(ip addr | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | egrep -v "^192\.168|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-2]\.|^10\.|^127\.|^255\.|^0\." | head -n 1) [ -z ${IP} ] && IP=$(wget -qO- -t1 -T2 ipv4.icanhazip.com)