update
This commit is contained in:
parent
78be9fbcf1
commit
0504f6edf9
@ -108,12 +108,12 @@ dl_extra_shell() {
|
||||
chmod 755 $extra_shell_path
|
||||
}
|
||||
# extra.sh 设置区设置
|
||||
set_default_extra() {
|
||||
set_default_extra() {
|
||||
echo -e "一、集成仓库 Shufflewzc-Faker2"
|
||||
read -p "直接回车拉取Faker2助力池版仓库,输入3回车拉取Faker3纯净仓库,输入4回车拉取Faker4简洁仓库" CollectedRepo
|
||||
CollectedRepo=${CollectedRepo:-"2"}
|
||||
sed -i "s/CollectedRepo=(4)/CollectedRepo=(${CollectedRepo})/g" $extra_shell_path
|
||||
read -p "直接回车拉取Faker2助力池版仓库,输入3回车拉取Faker3纯净仓库,输入4回车拉取Faker4简洁仓库: " CollectedRepo
|
||||
CollectedRepo=${CollectedRepo:-"2"} # 如果用户直接回车,则默认为 2
|
||||
}
|
||||
|
||||
# 将 ql extra 添加到定时任务
|
||||
add_ql_extra() {
|
||||
if [ "$(grep -c "ql\ extra" /ql/data/config/crontab.list)" != 0 ]; then
|
||||
|
||||
@ -248,7 +248,7 @@ if [ "$port" != "2" ]; then
|
||||
read JD_PORT
|
||||
done
|
||||
echo -e "\e[34m恭喜,端口:$JD_PORT 可用\e[0m"
|
||||
MAPPING_JD_PORT="-p $JD_PORT:5700"
|
||||
MAPPING_JD_PORT="-p $JD_PORT:5600"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
CollectedRepo=(2) ##示例:CollectedRepo=(2 4 6)
|
||||
## 2. 是否安装依赖和安装依赖包的名称设置
|
||||
dependencies="no" ##yes为安装,no为不安装
|
||||
package_name="canvas png-js date-fns axios crypto-js ts-md5 tslib @types/node dotenv typescript fs require tslib"
|
||||
|
||||
#------ 编号区 ------#
|
||||
:<<\EOF
|
||||
@ -44,31 +43,3 @@ for i in ${CollectedRepo[@]}; do
|
||||
CR$i
|
||||
sleep 10
|
||||
done
|
||||
|
||||
|
||||
# 📦依赖
|
||||
install_dependencies_normal(){
|
||||
for i in $@; do
|
||||
case $i in
|
||||
canvas)
|
||||
cd /ql/scripts
|
||||
if [[ "$(echo $(npm ls $i) | grep ERR)" != "" ]]; then
|
||||
npm uninstall $i
|
||||
fi
|
||||
if [[ "$(npm ls $i)" =~ (empty) ]]; then
|
||||
apk add --no-cache build-base g++ cairo-dev pango-dev giflib-dev && npm i $i --prefix /ql/scripts --build-from-source
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [[ "$(npm ls $i)" =~ $i ]]; then
|
||||
npm uninstall $i
|
||||
elif [[ "$(echo $(npm ls $i -g) | grep ERR)" != "" ]]; then
|
||||
npm uninstall $i -g
|
||||
fi
|
||||
if [[ "$(npm ls $i -g)" =~ (empty) ]]; then
|
||||
[[ $i = "typescript" ]] && npm i $i -g --force || npm i $i -g
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user