This is an automated email from the ASF dual-hosted git repository.

jiafengzheng pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 0c6d36ee9be add
0c6d36ee9be is described below

commit 0c6d36ee9beeab7a76974d94e141d37b7cebe52d
Author: jiafeng.zhang <zhang...@gmail.com>
AuthorDate: Mon Aug 15 12:42:13 2022 +0800

    add
---
 remove-non-reserved-dir.sh | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/remove-non-reserved-dir.sh b/remove-non-reserved-dir.sh
new file mode 100644
index 00000000000..42a3d65be95
--- /dev/null
+++ b/remove-non-reserved-dir.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+set -eo pipefail
+
+ROOT=`dirname "$0"`
+ROOT=`cd "$ROOT"; pwd`
+
+reserved=(
+build
+remove-non-reserved-dir.sh
+versions.json
+.asf.yaml
+.nojekyll
+.git
+.
+..
+)
+
+function contains() {
+    local n=$#
+    local value=${!n}
+    for ((i=1;i < $#;i++)) {
+        if [ "${!i}" == "${value}" ]; then
+            echo "y"
+            return 0
+        fi
+    }
+    echo "n"
+    return 1
+}
+
+for file in `ls -a $ROOT`
+do
+    if [ $(contains "${reserved[@]}" "$file") == "n" ]; then
+        echo "delete $ROOT/$file"
+        rm -rf $ROOT/$file
+    fi
+done


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to