From 7fa4c25788aa06cca64bbd6dabeab4dd244ae0c0 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Mon, 22 Aug 2016 23:10:18 +0900 Subject: [PATCH] update --- include/public.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/public.sh b/include/public.sh index 769d514..9c4dc95 100644 --- a/include/public.sh +++ b/include/public.sh @@ -423,6 +423,18 @@ version_lt(){ test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1" } +version_gt(){ + test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1" +} + +version_le(){ + test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1" +} + +version_ge(){ + test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1" +} + parallel_make(){ local para=$1 cpunum=`cat /proc/cpuinfo |grep 'processor'|wc -l` @@ -523,7 +535,6 @@ check_command_exist(){ fi } - #Install tools install_tool(){ if check_sys packageManager apt;then @@ -656,7 +667,6 @@ get_php_version(){ $phpConfig --version | cut -d'.' -f1-2 } - #Last confirm last_confirm(){ clear