This commit is contained in:
Faker 2024-08-21 00:27:03 +08:00
parent 78be9fbcf1
commit 0504f6edf9
3 changed files with 5 additions and 34 deletions

View File

@ -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

View File

@ -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

View File

@ -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
}