From f1ddde8713ef3ac923d91c3ff739638078a31412 Mon Sep 17 00:00:00 2001 From: zyyang-taosdata Date: Wed, 16 Feb 2022 17:01:00 +0800 Subject: [PATCH] clean env script --- packaging/clean_env.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 packaging/clean_env.sh diff --git a/packaging/clean_env.sh b/packaging/clean_env.sh new file mode 100755 index 0000000000..a889064693 --- /dev/null +++ b/packaging/clean_env.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +CUR_DIR=$(pwd) +SHELL_DIR=$(dirname $(readlink -f "$0")) +ENTERPRISE_DIR=$SHELL_DIR/../.. +COMMUNITY_DIR=$SHELL_DIR/.. +TOOLS_DIR=$COMMUNITY_DIR/src/kit/taos-tools + +cd $ENTERPRISE_DIR +git checkout -- . +if [[ -e enterprise/src/plugins/taosainternal/taosadapter ]]; then + rm -f enterprise/src/plugins/taosainternal/taosadapter +fi +if [[ -e enterprise/src/plugins/taosainternal/upx.tar.xz ]]; then + rm -f enterprise/src/plugins/taosainternal/upx.tar.xz +fi + +cd $COMMUNITY_DIR +git checkout -- . + +cd $TOOLS_DIR +git checkout -- . +if [[ -e packaging/tools/install-khtools.sh ]]; then + rm -f packaging/tools/install-khtools.sh +fi +if [[ -e packaging/tools/uninstall-khtools.sh ]]; then + rm -f packaging/tools/uninstall-khtools.sh +fi + +rm -rf $COMMUNITY_DIR/debug/* +rm -rf $COMMUNITY_DIR/release/* + +cd $CUR_DIR -- GitLab