From 30ed269eab38424d06d1404d17af40822ed6044e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Sun, 3 Mar 2024 19:31:47 +0800 Subject: [PATCH] feat: rename.sh --- shell/rename.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 shell/rename.sh diff --git a/shell/rename.sh b/shell/rename.sh new file mode 100644 index 0000000..3a5e14e --- /dev/null +++ b/shell/rename.sh @@ -0,0 +1,17 @@ +# pnpm build:app 之后会生成 unpackage/dist/build/app +# 我要把它改名为 unpackage/dist/build/unibest_app_build + +# 只有存在新的 app 文件时,才执行这些操作!!否则会误删!! +if test -d ./dist/build/app; then + echo '存在新打包出来的app' + + cd ./dist/build/ + + # 1、删除旧的 rename 后的文件夹 + if test -d './unibest_app_build'; then + rm -rf ./unibest_app_build + fi + + # 2、把 app 命名为 unibest_app_build + mv ./app ./unibest_app_build +fi