clean_env.sh 1.3 KB
Newer Older
Z
zyyang-taosdata 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/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 -- .
Z
change  
zyyang 已提交
20 21 22 23 24 25
if [[ -e src/plugins/taosadapter/taosadapter ]]; then
  rm -f src/plugins/taosadapter/taosadapter
fi
if [[ -e src/plugins/taosadapter/upx.tar.xz ]]; then
  rm -f src/plugins/taosadapter/upx.tar.xz
fi
Z
zyyang-taosdata 已提交
26 27 28 29 30 31 32 33 34

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
Z
change  
zyyang 已提交
35 36 37 38 39 40
if [[ -e packaging/tools/install-prodbtools.sh ]]; then
  rm -f packaging/tools/install-prodbtools.sh
fi
if [[ -e packaging/tools/uninstall-prodbtools.sh ]]; then
  rm -f packaging/tools/uninstall-prodbtools.sh
fi
Z
zyyang-taosdata 已提交
41 42 43

rm -rf $COMMUNITY_DIR/debug/*
rm -rf $COMMUNITY_DIR/release/*
Z
chagne  
zyyang 已提交
44
if [[ -e $COMMUNITY_DIR/rpms ]]; then
Z
change  
zyyang 已提交
45
  rm -rf $COMMUNITY_DIR/rpms
Z
chagne  
zyyang 已提交
46 47
fi
if [[ -e $COMMUNITY_DIR/debs ]]; then
Z
change  
zyyang 已提交
48
  rm -rf $COMMUNITY_DIR/debs
Z
chagne  
zyyang 已提交
49
fi
Z
zyyang-taosdata 已提交
50 51

cd $CUR_DIR