From 88497925f1fe5f046480d9bdf6e92c60d69a3351 Mon Sep 17 00:00:00 2001 From: Leon <62660101+Oreomeow@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:03:16 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9D=8CMove=20dependencies=20installations=20?= =?UTF-8?q?to=20code.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tasks/qlrepo/extra.sh | 71 ------------------------------------------- 1 file changed, 71 deletions(-) diff --git a/Tasks/qlrepo/extra.sh b/Tasks/qlrepo/extra.sh index 546d413..cbb171b 100644 --- a/Tasks/qlrepo/extra.sh +++ b/Tasks/qlrepo/extra.sh @@ -107,74 +107,3 @@ ql repo https://github.com/Aaron-lv/sync.git "jd_cfd" "" "" "jd_scripts" ## 口袋书店 ## ql raw https://raw.githubusercontent.com/Wenmoux/scripts/wen/jd/chinnkarahoi_jd_bookshop.js ql repo https://github.com/Wenmoux/scripts.git "chinnkarahoi_jd_bookshop" "" "" "wen" - - -# 依赖 -package_name="canvas png-js date-fns axios crypto-js ts-md5 tslib @types/node dotenv" - -install_dependencies_normal(){ - for i in $@; do - case $i in - canvas) - if [[ "$(npm ls $i)" =~ (empty) ]]; then - apk add --no-cache build-base g++ cairo-dev pango-dev giflib-dev && npm install $i --build-from-source - fi - ;; - *) - if [[ "$(npm ls $i -g)" =~ (empty) ]]; then - if [[ "$(npm ls $i)" =~ $i ]]; then - npm uninstall $i - fi - npm i $i -g - fi - ;; - esac - done -} - -install_dependencies_force(){ - for i in $@; do - if [[ "$(npm ls $i)" =~ $i ]]; then - npm uninstall $i - rm -rf /ql/scripts/node_modules/$i - rm -rf /ql/scripts/node_modules/lodash - elif [[ "$(npm ls $i -g)" =~ $i ]]; then - npm uninstall -g $i - rm -rf /usr/local/lib/node_modules/$i - rm -rf /usr/local/lib/node_modules/lodash - fi - case $i in - canvas) - if [[ "$(npm ls $i)" =~ (empty) ]]; then - apk add --no-cache build-base g++ cairo-dev pango-dev giflib-dev && npm install $i --build-from-source - fi - ;; - *) - if [[ "$(npm ls $i -g)" =~ (empty) ]]; then - if [[ "$(npm ls $i)" =~ $i ]]; then - npm uninstall $i - fi - npm i $i -g - fi - ;; - esac - done -} - -install_dependencies_all(){ - install_dependencies_normal $package_name - for i in $package_name; do - if [[ "$(npm ls $i -g)" =~ (empty) ]] && [[ "$(npm ls $i)" =~ (empty) ]]; then - install_dependencies_force $i - fi - done -} - -install_dependencies_all & - -:<