Skip to content

Commit 026baf3

Browse files
committed
🔧 调整unzip命令校验
1 parent 1a5f7df commit 026baf3

2 files changed

Lines changed: 4 additions & 20 deletions

File tree

scripts/web/init.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@ MICRO_FRONTEND_DOCUMENT="tca-document"
2626
# 子微前端
2727
MICRO_FRONTEND_APPS="login tca-layout tca-analysis tca-manage"
2828

29-
# 校验是否存在unzip命令
30-
function check_unzip_command() {
31-
if command_exists unzip; then
32-
return 0
33-
else
34-
return 1
35-
fi
36-
}
37-
3829
# 清理资源文件
3930
function clear_assets() {
4031
LOG_WARN "将路径下的资源文件和前端nginx配置备份到 ${TCA_WEB_DEPLOY_PATH}_bak 下..."
@@ -142,7 +133,8 @@ function log_env() {
142133
}
143134

144135
function init_web_config() {
145-
check_unzip_command || error_exit "unzip command not installed"
136+
# 校验是否存在unzip命令
137+
command_exists unzip || error_exit "unzip command not installed"
146138
clear_assets
147139
init_unzip_build
148140
init_framework_web

web/tca-deploy-source/scripts/init.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,6 @@ function log_env() {
118118
LOG_INFO "========================end 前端配置说明 end========================"
119119
}
120120

121-
# 校验是否存在unzip命令
122-
function check_unzip_command() {
123-
if command_exists unzip; then
124-
return 0
125-
else
126-
return 1
127-
fi
128-
}
129-
130121
# 清理资源文件
131122
function clear_assets() {
132123
LOG_WARN "将路径下的资源文件和前端nginx配置备份到 ${WEB_DEPLOY_PATH}_bak 下..."
@@ -220,7 +211,8 @@ function init_web_nginx() {
220211
"$ROOT_PATH"/nginx/ingress.conf >"$NGINX_CONF_PATH"/tca_ingress.conf
221212
}
222213

223-
check_unzip_command || error_exit "unzip command not installed"
214+
# 校验是否存在unzip命令
215+
command_exists unzip || error_exit "unzip command not installed"
224216
clear_assets
225217
init_unzip_build
226218
init_framework_web

0 commit comments

Comments
 (0)