From 329b27403ffba63c3253848cf98272e32bd188b7 Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Tue, 23 Feb 2021 19:44:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=A3=80=E6=B5=8B=E5=B9=B6?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=20xray-core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/AutoBuild_Function.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Scripts/AutoBuild_Function.sh b/Scripts/AutoBuild_Function.sh index 36cddf7..325836e 100644 --- a/Scripts/AutoBuild_Function.sh +++ b/Scripts/AutoBuild_Function.sh @@ -49,6 +49,8 @@ Diy_Part1_Base() { if [[ "${INCLUDE_HelloWorld}" == "true" ]];then ExtraPackages git lean luci-app-vssr https://github.com/jerrykuku master ExtraPackages git lean lua-maxminddb https://github.com/jerrykuku master + PKG_Finder d package xray-core + [[ -z "${PKG_RESULT}" ]] && ExtraPackages svn other xray-core https://github.com/fw876/helloworld/trunk fi if [[ "${INCLUDE_Bypass}" == "true" ]];then ExtraPackages git other luci-app-bypass https://github.com/garypang13 main @@ -163,6 +165,18 @@ Mkdir() { unset _DIR } +PKG_Finder() { + unset PKG_RESULT + PKG_TYPE=${1} + PKG_DIR=${2} + PKG_NAME=${3} + [[ -z ${PKG_TYPE} ]] && [[ -z ${PKG_NAME} ]] || [[ -z ${PKG_DIR} ]] && return + PKG_RESULT=$(find -name ${PKG_DIR}/${PKG_NAME} -type ${PKG_TYPE} -exec echo {} \;) + if [[ ! -z "${PKG_RESULT}" ]];then + echo "[${PKG_NAME}] is detected,Dir: ${PKG_RESULT}" + fi +} + ExtraPackages() { PKG_PROTO=${1} PKG_DIR=${2}