修复页面标题 fix 256, 修改 ql update 依赖安装逻辑

This commit is contained in:
hanhh
2021-06-07 00:57:57 +08:00
parent a8707e5422
commit 7f1c55c40a
8 changed files with 9851 additions and 10 deletions
+3 -5
View File
@@ -204,7 +204,7 @@ npm_install_sub() {
npm install --production --no-save --registry=https://registry.npm.taobao.org || npm install --production --no-save
else
echo -e "检测到本机安装了 pnpm,使用 pnpm 替代 ...\n"
pnpm install --prod --registry=https://registry.npm.taobao.org || pnpm install --prod
pnpm install --prod
fi
}
@@ -247,10 +247,8 @@ diff_and_copy() {
update_depend() {
local dir_current=$(pwd)
if [ ! -s $dir_scripts/package.json ] || [[ $(diff $dir_sample/package.json $dir_scripts/package.json) ]]; then
cp -f $dir_sample/package.json $dir_scripts/package.json
npm_install_2 $dir_scripts
fi
cp -f $dir_sample/package.json $dir_scripts/package.json
npm_install_2 $dir_scripts
if [ ! -s $dir_scripts/requirements.txt ] || [[ $(diff $dir_sample/requirements.txt $dir_scripts/requirements.txt) ]]; then
cp -f $dir_sample/requirements.txt $dir_scripts/requirements.txt
+1 -3
View File
@@ -247,7 +247,6 @@ usage() {
## 更新qinglong
update_qinglong() {
echo -e "--------------------------------------------------------------\n"
[ -f $dir_root/package.json ] && ql_depend_old=$(cat $dir_root/package.json)
reset_romote_url ${dir_root} "${github_proxy_url}https://github.com/whyour/qinglong.git"
git_pull_scripts $dir_root
@@ -257,8 +256,7 @@ update_qinglong() {
detect_config_version
update_depend
[ -f $dir_root/package.json ] && ql_depend_new=$(cat $dir_root/package.json)
[[ "$ql_depend_old" != "$ql_depend_new" ]] && npm_install_2 $dir_root
npm_install_2 $dir_root
else
echo -e "\n更新$dir_root失败,请检查原因...\n"
fi