diff --git a/packaging/sed_pro.sh b/packaging/sed_pro.sh index 08965413c8df3da22075414e6d2947d9c0d7741d..76f37ca99c097cf61f4272fdc2dc8c23f25d5dbb 100755 --- a/packaging/sed_pro.sh +++ b/packaging/sed_pro.sh @@ -1,6 +1,23 @@ #!/bin/bash function replace_community_pro() { + # src/kit/taos-tools/packaging/tools/install-taostools.sh + sed -i "s/demoName=\"taosdemo\"/demoName=\"prodemo\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh + sed -i "s/benchmarkName=\"taosBenchmark\"/benchmarkName=\"proBenchmark\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh + sed -i "s/dumpName=\"taosdump\"/dumpName=\"prodump\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh + sed -i "s/emailName=\"taosdata\.com\"/emailName=\"hanatech\.com\.cn\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh + sed -i "s/taosName=\"taos\"/taosName=\"prodb\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh + sed -i "s/toolsName=\"taostools\"/toolsName=\"prodbtools\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh + cp -f ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh ${top_dir}/src/kit/taos-tools/packaging/tools/install-prodbtools.sh + + # src/kit/taos-tools/packaging/tools/uninstall-taostools.sh + sed -i "s/demoName=\"taosdemo\"/demoName=\"prodemo\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh + sed -i "s/benchmarkName=\"taosBenchmark\"/benchmarkName=\"proBenchmark\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh + sed -i "s/dumpName=\"taosdump\"/dumpName=\"prodump\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh + sed -i "s/taosName=\"taos\"/taosName=\"prodb\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh + sed -i "s/toolsName=\"taostools\"/toolsName=\"prodbtools\"/g" ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh + cp -f ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-prodbtools.sh + # src/kit/taos-tools/src/CMakeLists.txt sed -i "s/taosBenchmark /proBenchmark /g" ${top_dir}/src/kit/taos-tools/src/CMakeLists.txt sed -i "s/taosdump /prodump /g" ${top_dir}/src/kit/taos-tools/src/CMakeLists.txt @@ -82,6 +99,8 @@ function replace_community_pro() { sed -i "s/tarName=\"taos\.tar\.gz\"/tarName=\"prodb\.tar\.gz\"/g" ${top_dir}/packaging/tools/makepkg.sh sed -i "s/dumpName=\"taosdump\"/dumpName=\"prodump\"/g" ${top_dir}/packaging/tools/makepkg.sh sed -i "s/benchmarkName=\"taosBenchmark\"/benchmarkName=\"proBenchmark\"/g" ${top_dir}/packaging/tools/makepkg.sh + sed -i "s/toolsName=\"taostools\"/toolsName=\"prodbtools\"/g" ${top_dir}/packaging/tools/makepkg.sh + # packaging/tools/remove.sh sed -i "s/installDir=\"\/usr\/local\/taos\"/installDir=\"\/usr\/local\/ProDB\"/g" ${top_dir}/packaging/tools/remove.sh sed -i "s/serverName=\"taosd\"/serverName=\"prodbs\"/g" ${top_dir}/packaging/tools/remove.sh diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 07850d0f94b6c77a7a083cf6f11c557bae8692f3..e7907065f1efdfcdc1f101e42d3ecae2eddeb33c 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -27,6 +27,7 @@ configFile="taos.cfg" tarName="taos.tar.gz" dumpName="taosdump" benchmarkName="taosBenchmark" +toolsName="taostools" # create compressed install file. build_dir="${compile_dir}/build" @@ -127,22 +128,22 @@ if [ -n "${taostools_bin_files}" ]; then cp ${taostools_bin_files} ${taostools_install_dir}/bin && chmod a+x ${taostools_install_dir}/bin/* || : - if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh ]; then - cp ${top_dir}/src/kit/taos-tools/packaging/tools/install-taostools.sh \ + if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/install-${toolsName}.sh ]; then + cp ${top_dir}/src/kit/taos-tools/packaging/tools/install-${toolsName}.sh \ ${taostools_install_dir}/ >/dev/null && - chmod a+x ${taostools_install_dir}/install-taostools.sh || - echo -e "failed to copy install-taostools.sh" + chmod a+x ${taostools_install_dir}/install-${toolsName}.sh || + echo -e "failed to copy install-${toolsName}.sh" else - echo -e "install-taostools.sh not found" + echo -e "install-${toolsName}.sh not found" fi - if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh ]; then - cp ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-taostools.sh \ + if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-${toolsName}.sh ]; then + cp ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-${toolsName}.sh \ ${taostools_install_dir}/ >/dev/null && - chmod a+x ${taostools_install_dir}/uninstall-taostools.sh || - echo -e "failed to copy uninstall-taostools.sh" + chmod a+x ${taostools_install_dir}/uninstall-${toolsName}.sh || + echo -e "failed to copy uninstall-${toolsName}.sh" else - echo -e "uninstall-taostools.sh not found" + echo -e "uninstall-${toolsName}.sh not found" fi if [ -f ${build_dir}/lib/libavro.so.23.0.0 ]; then