提交 23fe5448 编写于 作者: wafwerar's avatar wafwerar

build: check version before install

上级 c4d9fdbf
IF (TD_LINUX)
IF (EXISTS /var/lib/taos/dnode/dnodeCfg.json)
INSTALL(CODE "MESSAGE(\"The default data directory /var/lib/taos contains old data of tdengine 2.x, please clear it before installing!\")")
ELSEIF (EXISTS C:/TDengine/data/dnode/dnodeCfg.json)
INSTALL(CODE "MESSAGE(\"The default data directory C:/TDengine/data contains old data of tdengine 2.x, please clear it before installing!\")")
ELSEIF (TD_LINUX)
SET(TD_MAKE_INSTALL_SH "${TD_SOURCE_DIR}/packaging/tools/make_install.sh")
INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")")
INSTALL(CODE "execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_SOURCE_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})")
......
Package: tdengine
Version: 1.0.0
Version: 3.0.0
Section: utils
Priority: optional
#Essential: no
......
#!/bin/bash
if [ -f /var/lib/taos/dnode/dnodeCfg.json ]; then
echo -e "The default data directory \033[41;37m/var/lib/taos\033[0m contains old data of tdengine 2.x, please clear it before installing!"
exit 1
fi
csudo=""
if command -v sudo > /dev/null; then
csudo="sudo "
......
#!/bin/bash
if [ $1 -eq "abort-upgrade" ]; then
exit 0
fi
insmetaPath="/usr/local/taos/script"
csudo=""
......
......@@ -132,6 +132,10 @@ fi
#Scripts executed before installation
%pre
if [ -f /var/lib/taos/dnode/dnodeCfg.json ]; then
echo -e "The default data directory \033[41;37m/var/lib/taos\033[0m contains old data of tdengine 2.x, please clear it before installing!"
exit 1
fi
csudo=""
if command -v sudo > /dev/null; then
csudo="sudo "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册