From 594f98199e5bac4693d31e65751fdfe1d5e8a4ff Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 16 Nov 2021 16:30:19 +0800 Subject: [PATCH] Hotfix/sangshuduo/td 11070 cmake external project (#8701) * [TD-11070]: cmake jemalloc script. * detech sh link is dash or others --- cmake/platform.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/platform.inc b/cmake/platform.inc index 463a5ebbab..2a0aace8d0 100755 --- a/cmake/platform.inc +++ b/cmake/platform.inc @@ -36,7 +36,13 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux") # Get OS information and store in variable TD_OS_INFO. # execute_process(COMMAND chmod 777 ${TD_COMMUNITY_DIR}/packaging/tools/get_os.sh) - execute_process(COMMAND ${TD_COMMUNITY_DIR}/packaging/tools/get_os.sh "" OUTPUT_VARIABLE TD_OS_INFO) + execute_process(COMMAND readlink /bin/sh OUTPUT_VARIABLE SHELL_LINK) + MESSAGE(STATUS "The shell is: " ${SHELL_LINK}) + IF (${SHELL_LINK} MATCHES "dash") + execute_process(COMMAND ${TD_COMMUNITY_DIR}/packaging/tools/get_os.sh "" OUTPUT_VARIABLE TD_OS_INFO) + ELSE () + execute_process(COMMAND sh ${TD_COMMUNITY_DIR}/packaging/tools/get_os.sh "" OUTPUT_VARIABLE TD_OS_INFO) + ENDIF() MESSAGE(STATUS "The current os is " ${TD_OS_INFO}) SET(TD_LINUX TRUE) -- GitLab