rename.sh 500 B

123456789101112131415161718
  1. # pnpm build:app 之后会生成 unpackage/dist/build/app
  2. # 我要把它改名为 unpackage/dist/build/unibest_app_build
  3. # 只有存在新的 app 文件时,才执行这些操作!!否则会误删!!
  4. if test -d ./dist/build/app; then
  5. echo '存在新打包出来的app'
  6. cd ./dist/build/
  7. # 1、删除旧的 rename 后的文件夹
  8. if test -d './unibest_app_build'; then
  9. rm -rf ./unibest_app_build
  10. fi
  11. # 2、把 app 命名为 unibest_app_build
  12. mv ./app ./unibest_app_build
  13. fi