更新于 07-14 23:30

This commit is contained in:
root
2021-07-14 23:30:06 -04:00
parent 2fde215f67
commit 5f6dc4e506

12
jd.sh
View File

@@ -944,10 +944,16 @@ detect_config_version() {
## npm install 子程序判断是否为安卓判断是否安装有yarn
npm_install_sub() {
local cmd_1 cmd_2
type pnpm >/dev/null 2>&1 && cmd_1=pnpm || cmd_1=npm
type yarn >/dev/null 2>&1 && cmd_1=yarn || cmd_1=npm
if [[ $(type pnpm) ]] >/dev/null 2>&1; then
cmd_1=pnpm
elif [[ $(type yarn) ]] >/dev/null 2>&1; then
cmd_1=yarn
else
cmd_1=npm
fi
[[ $SYSTEM = Android ]] && cmd_2="--no-bin-links" || cmd_2=""
$cmd_1 install $cmd_2 --registry=https://registry.npm.taobao.org || $cmd_1 install $cmd_2
$cmd_1 install $cmd_2
}
## npm install$1package.json文件所在路径