This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-doris-website.git
commit c14c5f4f4c7d6532dd61a5c0db3ee605e6993934 Author: morningman <[email protected]> AuthorDate: Mon Jan 10 19:45:30 2022 +0800 Update versions.json and add remove-non-reserved-dir.sh --- remove-non-reserved-dir.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ versions.json | 16 ++++++++-------- 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/remove-non-reserved-dir.sh b/remove-non-reserved-dir.sh new file mode 100644 index 0000000..97a13a7 --- /dev/null +++ b/remove-non-reserved-dir.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +set -eo pipefail + +ROOT=`dirname "$0"` +ROOT=`cd "$ROOT"; pwd` + +reserved=( +branch-0.11 +branch-0.12 +branch-0.13 +branch-0.14 +branch-0.15 +incubator-doris +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 diff --git a/versions.json b/versions.json index 2e42f59..2b90992 100644 --- a/versions.json +++ b/versions.json @@ -1,36 +1,36 @@ { - "en": [ + "": [ { "text": "Versions", "items": [ { "text": "master", - "link": "/../master/en/installing/compilation.html", + "link": "/../installing/compilation.html", "target": "_blank" }, { "text": "branch-0.15", - "link": "/../branch-0.15/en/installing/compilation.html", + "link": "/../branch-0.15/installing/compilation.html", "target": "_blank" }, { "text": "branch-0.14", - "link": "/../branch-0.14/en/installing/compilation.html", + "link": "/../branch-0.14/installing/compilation.html", "target": "_blank" }, { "text": "branch-0.13", - "link": "/../branch-0.13/en/installing/compilation.html", + "link": "/../branch-0.13/installing/compilation.html", "target": "_blank" }, { "text": "branch-0.12", - "link": "/../branch-0.12/en/installing/compilation.html", + "link": "/../branch-0.12/installing/compilation.html", "target": "_blank" }, { "text": "branch-0.11", - "link": "/../branch-0.11/en/installing/compilation.html", + "link": "/../branch-0.11/installing/compilation.html", "target": "_blank" } ] @@ -42,7 +42,7 @@ "items": [ { "text": "master", - "link": "/../master/zh-CN/installing/compilation.html", + "link": "/../zh-CN/installing/compilation.html", "target": "_blank" }, { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
