diff --git a/.github/workflows/tdengine-test.yml b/.github/workflows/tdengine-test.yml
index 3ab6d3c1d1..ee4b611f6a 100644
--- a/.github/workflows/tdengine-test.yml
+++ b/.github/workflows/tdengine-test.yml
@@ -53,7 +53,6 @@ jobs:
run-tests-on-mac:
uses: taosdata/.github/.github/workflows/run-tests-on-macos.yml@main
- if: ${{ github.event_name == 'pull_request' }}
with:
tdinternal: false
specified_source_branch: ${{ github.event_name == 'pull_request' && 'unavailable' || inputs.specified_source_branch }}
@@ -62,7 +61,6 @@ jobs:
run-tests-on-windows:
uses: taosdata/.github/.github/workflows/run-tests-on-windows.yml@main
- if: ${{ github.event_name == 'pull_request' }}
with:
tdinternal: false
specified_source_branch: ${{ github.event_name == 'pull_request' && 'unavailable' || inputs.specified_source_branch }}
diff --git a/README.md b/README.md
index 568bb82cfb..e30f4d9869 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
-[](https://github.com/taosdata/TDengine/actions/workflows/taosd-ci-build.yml)
+[](https://github.com/taosdata/TDengine/actions/workflows/tdengine-test.yml)
[](https://coveralls.io/github/taosdata/TDengine?branch=3.0)
[](https://github.com/feici02/TDengine/commits/main/)
diff --git a/packaging/tools/remove.sh b/packaging/tools/remove.sh
index 621ed7f2a9..f8cdfb3f78 100755
--- a/packaging/tools/remove.sh
+++ b/packaging/tools/remove.sh
@@ -162,9 +162,9 @@ remove_service_of() {
remove_tools_of() {
_tool=$1
kill_service_of ${_tool}
- [ -e "${bin_link_dir}/${_tool}" ] && ${csudo}rm -rf ${bin_link_dir}/${_tool} || :
+ [ -L "${bin_link_dir}/${_tool}" ] && ${csudo}rm -rf ${bin_link_dir}/${_tool} || :
[ -e "${installDir}/bin/${_tool}" ] && ${csudo}rm -rf ${installDir}/bin/${_tool} || :
- [ -e "${local_bin_link_dir}/${_tool}" ] && ${csudo}rm -rf ${local_bin_link_dir}/${_tool} || :
+ [ -L "${local_bin_link_dir}/${_tool}" ] && ${csudo}rm -rf ${local_bin_link_dir}/${_tool} || :
}
remove_bin() {
@@ -236,21 +236,56 @@ function remove_data_and_config() {
[ -d "${log_dir}" ] && ${csudo}rm -rf ${log_dir}
}
-echo
-echo "Do you want to remove all the data, log and configuration files? [y/n]"
-read answer
-remove_flag=false
-if [ X$answer == X"y" ] || [ X$answer == X"Y" ]; then
- confirmMsg="I confirm that I would like to delete all data, log and configuration files"
- echo "Please enter '${confirmMsg}' to continue"
+function usage() {
+ echo -e "\nUsage: $(basename $0) [-e ]"
+ echo "-e: silent mode, specify whether to remove all the data, log and configuration files."
+ echo " yes: remove the data, log, and configuration files."
+ echo " no: don't remove the data, log, and configuration files."
+}
+
+# main
+interactive_remove="yes"
+remove_flag="false"
+
+while getopts "e:h" opt; do
+ case $opt in
+ e)
+ interactive_remove="no"
+
+ if [ "$OPTARG" == "yes" ]; then
+ remove_flag="true"
+ echo "Remove all the data, log, and configuration files."
+ elif [ "$OPTARG" == "no" ]; then
+ remove_flag="false"
+ echo "Do not remove the data, log, and configuration files."
+ else
+ echo "Invalid option for -e: $OPTARG"
+ usage
+ exit 1
+ fi
+ ;;
+ h | *)
+ usage
+ exit 1
+ ;;
+ esac
+done
+
+if [ "$interactive_remove" == "yes" ]; then
+ echo -e "\nDo you want to remove all the data, log and configuration files? [y/n]"
read answer
- if [ X"$answer" == X"${confirmMsg}" ]; then
- remove_flag=true
- else
- echo "answer doesn't match, skip this step"
+ if [ X$answer == X"y" ] || [ X$answer == X"Y" ]; then
+ confirmMsg="I confirm that I would like to delete all data, log and configuration files"
+ echo "Please enter '${confirmMsg}' to continue"
+ read answer
+ if [ X"$answer" == X"${confirmMsg}" ]; then
+ remove_flag="true"
+ else
+ echo "answer doesn't match, skip this step"
+ fi
fi
+ echo
fi
-echo
if [ -e ${install_main_dir}/uninstall_${PREFIX}x.sh ]; then
if [ X$remove_flag == X"true" ]; then
diff --git a/packaging/tools/remove_client.sh b/packaging/tools/remove_client.sh
index 33454d7512..a7eb225704 100755
--- a/packaging/tools/remove_client.sh
+++ b/packaging/tools/remove_client.sh
@@ -57,7 +57,7 @@ function clean_bin() {
${csudo}rm -f ${bin_link_dir}/${dumpName2} || :
${csudo}rm -f ${bin_link_dir}/${uninstallScript2} || :
${csudo}rm -f ${bin_link_dir}/set_core || :
- [ -f ${bin_link_dir}/${inspect_name} ] && ${csudo}rm -f ${bin_link_dir}/${inspect_name} || :
+ [ -L ${bin_link_dir}/${inspect_name} ] && ${csudo}rm -f ${bin_link_dir}/${inspect_name} || :
if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then
${csudo}rm -f ${bin_link_dir}/${clientName2} || :
@@ -65,7 +65,7 @@ function clean_bin() {
${csudo}rm -f ${bin_link_dir}/${benchmarkName2} || :
${csudo}rm -f ${bin_link_dir}/${dumpName2} || :
${csudo}rm -f ${bin_link_dir}/${uninstallScript2} || :
- [ -f ${bin_link_dir}/${inspect_name} ] && ${csudo}rm -f ${bin_link_dir}/${inspect_name} || :
+ [ -L ${bin_link_dir}/${inspect_name} ] && ${csudo}rm -f ${bin_link_dir}/${inspect_name} || :
fi
}