build: check version before install
This commit is contained in:
parent
c4d9fdbf04
commit
23fe5448c3
|
@ -1,4 +1,8 @@
|
|||
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})")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: tdengine
|
||||
Version: 1.0.0
|
||||
Version: 3.0.0
|
||||
Section: utils
|
||||
Priority: optional
|
||||
#Essential: no
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/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 "
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/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 "
|
||||
|
|
Loading…
Reference in New Issue