-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·33 lines (30 loc) · 1.14 KB
/
setup.sh
File metadata and controls
executable file
·33 lines (30 loc) · 1.14 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
#!/bin/bash -ex
if [[ "$(uname -a)" =~ 'Darwin' ]]; then
# 1. Xcode command line tool install
#xcode-select --install
#sudo xcodebuild -license accept
# 2. brew install
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# 3. brew update
# brew update
# export HOMEBREW_CASK_OPTS="--appdir=/Applications"
./brew.sh
./common.sh
# 4. install ansible
#brew install ansible
# 5. execute ansible playbook
#ansible-playbook -i localhost -e os_name=mac -e user=$USER develop-setup-playbook.yml
elif [[ "$(uname -a)" =~ 'ubuntu' ]]; then
sudo apt -y update
apt install -y ansible
ansible-playbook -i localhost -e os_name=ubuntu -e user=$USER develop-setup-playbook.yml
elif [[ "$(uname -a)" =~ 'centos' ]]; then
sudo yum -y update
yum install -y ansible
ansible-playbook -i localhost -e os_name=centos -e user=$USER develop-setup-playbook.yml
elif [[ "$(uname -a)" =~ '[Mm]icrosoft' ]]; then
# Windows for Ubuntu上でインストールする
sudo apt -y update
sudo apt install -y ansible
ansible-playbook -i localhost -e os_name=windows -e user=$USER develop-setup-playbook.yml
fi