diff --git a/setup-dist-dir.sh b/setup-dist-dir.sh index ece43b570..5e8459a80 100755 --- a/setup-dist-dir.sh +++ b/setup-dist-dir.sh @@ -1,13 +1,12 @@ # step 1 create basic dirs -mkdir -p ./dist/en ./dist/zh-HK ./dist/zh-CN +# mv all dist to temp dir for backup +mv ./dist/zh-CN /tmp/ && mv ./dist/zh-HK /tmp/ && mv ./dist/en /tmp/ -# step 2 mv default en assets to dist/en -mv ./dist/learn.html ./dist/en/ -mv ./dist/sitemap.xml ./dist/en/ -mv ./dist/404.html ./dist/en/ -mv ./dist/.nojekyll ./dist/en/ +# cp all dist file to dist/en +mkdir -p ./dist/en +mv ./dist/* ./dist/en/ +mv /tmp/zh-CN ./dist/ && mv /tmp/zh-HK ./dist/ && mv /tmp/en/* ./dist/en/ # step 3 remove duplicated files -rm -rf ./dist/zh-CN/assets ./dist/zh-HK/assets cp -rf ./dist/zh-CN/zh-CN/* ./dist/zh-CN/ && rm -rf ./dist/zh-CN/zh-CN cp -rf ./dist/zh-HK/zh-HK/* ./dist/zh-HK/ && rm -rf ./dist/zh-HK/zh-HK