-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjava21install.sh
More file actions
36 lines (34 loc) · 977 Bytes
/
Copy pathjava21install.sh
File metadata and controls
36 lines (34 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
install() {
apt install wget -y
echo "> 开始安装java-21"
wget -O java21.deb https://lz.qaiu.top/parser?url=https://pan.seeoss.com/s/nLNsQ
dpkg -i java21.deb
apt --fix-broken install -y
echo "安装完成..."
exit
bash <(curl -sSL https://raw.githubusercontent.com/zhuyejun520/Android-for-MCSManager/main/mian.sh)
}
# 脚本入口
if [ $# -gt 0 ]; then
# 如果有命令行参数,则直接执行对应的函数
function_name="$1"
echo "直接进入子功能 $function_name , 更多选项请运行以上命令"
echo ">"
shift
$function_name "$@"
else
echo ""
echo "本脚本大部分操作基于 ZeroTermux"
while true; do
echo ""
echo "是否开始安装Java-21环境[确认输入yes/取消输入no]"
read -p "请输入: " input
case $input in
'yes') install ;;
'no') break ;;
*) ;;
esac
done
fi
echo "脚本执行完毕"