-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·53 lines (43 loc) · 1.16 KB
/
init.sh
File metadata and controls
executable file
·53 lines (43 loc) · 1.16 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
echo "开始初始化环境..."
echo -e "\n\033[33m1. 运行系统设置...\033[0m"
bash setup.sh
echo -e "\n\033[33m2. 配置 GitHub...\033[0m"
bash gh-install.sh
echo -e "\n\033[33m3. 安装命令...\033[0m"
bash install-command.sh
# 添加安装参数解析
INSTALL_DOCKER=false
INSTALL_ZSH=false
INSTALL_DOKPLOY=false
for arg in "$@"; do
case "$arg" in
"--install-docker"|"-id")
INSTALL_DOCKER=true
;;
"--install-zsh"|"-iz")
INSTALL_ZSH=true
;;
"--install-dokploy"|"-ik")
INSTALL_DOKPLOY=true
;;
"--all"|"-a")
INSTALL_DOCKER=true
INSTALL_ZSH=true
INSTALL_DOKPLOY=true
;;
esac
done
if [ "$INSTALL_DOCKER" = true ]; then
echo -e "\n\033[33m4. 安装Docker...\033[0m"
bash docker-install.sh # 已修复拼写错误
fi
if [ "$INSTALL_ZSH" = true ]; then
echo -e "\n\033[33m5. 安装ZSH...\033[0m"
bash zsh-install.sh
fi
if [ "$INSTALL_DOKPLOY" = true ]; then
echo -e "\n\033[33m6. 安装Dokploy...\033[0m"
bash dokploy-install.sh
fi
echo -e "\n\033[32m所有配置已完成!\033[0m"