-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_Start_Recover
More file actions
executable file
·104 lines (88 loc) · 4.38 KB
/
Copy path_Start_Recover
File metadata and controls
executable file
·104 lines (88 loc) · 4.38 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/sh -e
sudo -v #请求管理员权限
cd "$(dirname "$0")"
ROOT_PATH=$(pwd -P)
info () {
printf "\r [ \033[00;34m..\033[0m ] $1\n"
}
success () {
printf "\r\033[2K [ \033[00;32mOK\033[0m ] $1\n"
}
fail () {
printf "\r\033[2K [\033[0;31mFAIL\033[0m] $1\n"
}
info "> Install Xcode Tools..."
xcode-select --install
#-------------------------------------------------------------------------------
# 安装Brew软件包管理器,以及oh-my-zsh shell终端
# Brew软件包管理器比较方便,个人觉得还是安装,另外还能配置成开发模式,安装xcode tool、创建 /usr/local/bin目录等
# oh-my-zsh 如果习惯用自带的bash的话可以不安装这个
# 添加一些基本shell方法到 "/usr/local/bin" 作为全局函数使用 (例如:ssh自动登录脚本)
#-------------------------------------------------------------------------------
info ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Script Begin >>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
info ""
info "-------------------------------------------------------------------------"
info " > Install Brew package manager for macOS (https://brew.sh/)"
info " > 安装Brew软件包管理器"
info "-------------------------------------------------------------------------"
info ""
if test ! $(which brew)
then
info " > Installing Brew.."
/bin/bash -c "$(curl -fsSL https://gitee.com/Semoz/homebrew-install/raw/master/install.sh)"
success "# brew install success"
else
fail "# brew already installed"
fi
info ""
info "-------------------------------------------------------------------------"
info " > Install oh-my-zsh for macOS (https://ohmyz.sh/)"
info " > 安装Shell(oh-my-zsh)"
info "-------------------------------------------------------------------------"
info ""
if [ ! -d ~/.oh-my-zsh ]
then
info "> Installing oh-my-zsh.."
sh -c "$(curl -fsSL https://gitee.com/Semoz/ohmyzsh/raw/master/tools/install.sh)"
success "# oh-my-zsh installed success"
else
fail "# oh-my-zsh already installed"
fi
info "-------------------------------------------------------------------------"
# 记得处理node_modules 和 WeChatProjects
#-------------------------------------------------------------------------------
# 1. Add Common Shell Functions To "/usr/local/bin" (e.g "ssh_login expect")
# 1. 添加一些基本shell方法到 "/usr/local/bin" 作为全局函数使用 (例如:ssh自动登录脚本)
#-------------------------------------------------------------------------------
#$ROOT_PATH"/bin-shell/install"
#-------------------------------------------------------------------------------
# 2. Link Basic File Path (e.g. Link Data&&Conifg to $HOME)
# 2. 软链接一些之后脚本需要用到的目录结构 (例如:配置文件或者app数据文件 链接到 主目录下)
#-------------------------------------------------------------------------------
$ROOT_PATH"/directory/install"
#-------------------------------------------------------------------------------
# 3. Link Data File Path (e.g. Private Data In Dropbox)
# 3. 软链接数据文件以及app配置数据 (例如:QQ聊天记录或其他不需要上传到github,存储在Dropbox中的一些配置)
#-------------------------------------------------------------------------------
$ROOT_PATH"/app-config/install"
#-------------------------------------------------------------------------------
# 4. Dot Files (Public Data, Dotfile In Github)
# 4. 可以存储在Github上的dotfiles
#-------------------------------------------------------------------------------
$ROOT_PATH"/dot-file/install"
#-------------------------------------------------------------------------------
# 5. macOS Conifg (10.13.4)
# 5. 苹果系统设置脚本
#-------------------------------------------------------------------------------
$ROOT_PATH"/osx/install"
#-------------------------------------------------------------------------------
# 6. Install Brew Software
# 6. 安装Brew软件 (一些通过brew安装的软件可以在这里配置)
#-------------------------------------------------------------------------------
$ROOT_PATH"/brew/install"
#-------------------------------------------------------------------------------
# 7. Run Script
# 7. 运行一些剩余的脚本 (例如:软件安装切换到任何来源)
#-------------------------------------------------------------------------------
#$ROOT_PATH"/7_Run/install"
info "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Script End <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"