修改check命令,安装依赖使用代理

修改apk源地址
This commit is contained in:
whyour
2022-02-16 23:06:12 +08:00
parent 71b0c10997
commit 86df495b67
4 changed files with 6 additions and 14 deletions
+2 -4
View File
@@ -10,13 +10,11 @@ reset_env() {
echo -e "---> 配置文件检测完成\n"
echo -e "---> 2. 开始安装青龙依赖\n"
rm -rf $dir_root/node_modules
npm_install_2 $dir_root
echo -e "---> 青龙依赖安装完成\n"
echo -e "---> 3. 开始安装脚本依赖\n"
cp -f $dir_sample/package.json $dir_scripts/package.json
rm -rf $dir_scripts/node_modules
npm_install_2 $dir_scripts
echo -e "---> 脚本依赖安装完成\n"
}
@@ -50,8 +48,8 @@ pm2_log() {
echo -e "---> pm2日志"
local panelOut="/root/.pm2/logs/panel-out.log"
local panelError="/root/.pm2/logs/panel-error.log"
tail -n 20 "$panelOut"
tail -n 20 "$panelError"
tail -n 100 "$panelOut"
tail -n 100 "$panelError"
}
check_nginx() {
+2
View File
@@ -242,6 +242,7 @@ fix_config() {
}
npm_install_sub() {
set_proxy
if [ $is_termux -eq 1 ]; then
npm install --production --no-bin-links --registry=https://registry.npm.taobao.org || npm install --production --no-bin-links
elif ! type pnpm &>/dev/null; then
@@ -249,6 +250,7 @@ npm_install_sub() {
else
pnpm install --production --registry=https://registry.npm.taobao.org || pnpm install --production
fi
unset_proxy
}
npm_install_1() {
+1 -9
View File
@@ -161,15 +161,7 @@ update_repo() {
echo -e "\n更新${repo_path}成功...\n"
diff_scripts "$repo_path" "$author" "$path" "$blackword" "$dependence"
else
echo -e "\n更新${repo_path}失败,重新下载全新仓库...\n"
rm -rf ${repo_path}
git_clone_scripts "${formatUrl}" ${repo_path} "${branch}"
if [[ $exit_status -eq 0 ]]; then
echo -e "\n更新${repo_path}成功...\n"
diff_scripts "$repo_path" "$author" "$path" "$blackword" "$dependence"
else
echo -e "\n更新${repo_path}失败,请检查网络...\n"
fi
echo -e "\n更新${repo_path}失败,请检查网络...\n"
fi
}