@@ -9,68 +9,68 @@ ANSIBLE_REPO="https://github.com/yuhonas/dotfiles.git"
9
9
export ANSIBLE_NOCOWS=1
10
10
11
11
if [ " $( uname) " == " Darwin" ]; then
12
- # Download and install Command Line Tools
13
- if [[ ! -x /usr/bin/gcc ]]; then
14
- echo " Info | Install | xcode"
15
- xcode-select --install
16
- fi
12
+ # Download and install Command Line Tools
13
+ if [[ ! -x /usr/bin/gcc ]]; then
14
+ echo " Info | Install | xcode"
15
+ xcode-select --install
16
+ fi
17
17
18
- # Download and install homebrew
19
- if [[ ! -x /opt/homebrew/bin/brew ]]; then
20
- echo " Info | Install | homebrew"
21
- ruby -e " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install) "
22
- fi
23
- eval $( /opt/homebrew/bin/brew shellenv)
18
+ # Download and install homebrew
19
+ if [[ ! -x /opt/homebrew/bin/brew ]]; then
20
+ echo " Info | Install | homebrew"
21
+ ruby -e " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install) "
22
+ # /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
23
+ fi
24
+ eval $( /opt/homebrew/bin/brew shellenv)
24
25
else
25
- # Download and install linuxbrew
26
- if [[ ! -x /home/linuxbrew/.linuxbrew/bin/brew ]]; then
27
- # archlinux
28
- sudo pacman --sync --refresh --noconfirm --needed \
29
- base-devel \
30
- git ca-certificates \
31
- curl \
32
- git \
33
- libxcrypt-compat # for homebrew installation which installs ruby 2.6.8
26
+ # Download and install linuxbrew
27
+ if [[ ! -x /home/linuxbrew/.linuxbrew/bin/brew ]]; then
28
+ # archlinux
29
+ sudo pacman --sync --refresh --noconfirm --needed \
30
+ base-devel \
31
+ git ca-certificates \
32
+ curl \
33
+ git \
34
+ libxcrypt-compat # for homebrew installation which installs ruby 2.6.8
34
35
35
- # set locale
36
- sudo localedef -i en_US -f UTF-8 en_US.UTF-8
36
+ # set locale
37
+ sudo localedef -i en_US -f UTF-8 en_US.UTF-8
37
38
38
- echo " Info | Install | linuxbrew"
39
- /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
40
- echo ' eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> $HOME /.bash_profile
41
- fi
42
- eval $( /home/linuxbrew/.linuxbrew/bin/brew shellenv)
39
+ echo " Info | Install | linuxbrew"
40
+ /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
41
+ echo ' eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> $HOME /.bash_profile
42
+ fi
43
+ eval $( /home/linuxbrew/.linuxbrew/bin/brew shellenv)
43
44
fi
44
45
45
46
brew update
46
47
47
48
# Download and install git
48
- if ! type git > /dev/null 2>&1 ; then
49
- echo " Info | Install | git"
50
- brew install git
49
+ if ! type git > /dev/null 2>&1 ; then
50
+ echo " Info | Install | git"
51
+ brew install git
51
52
fi
52
53
53
54
# Download and install Ansible
54
- if ! type ansible > /dev/null 2>&1 ; then
55
- echo " Info | Install | ansible"
56
- brew install ansible
55
+ if ! type ansible > /dev/null 2>&1 ; then
56
+ echo " Info | Install | ansible"
57
+ brew install ansible
57
58
fi
58
59
59
60
# Make the code directory
60
61
mkdir -p $SRC_DIRECTORY
61
62
62
63
# Clone down ansible
63
64
if [[ ! -d $ANSIBLE_DIRECTORY ]]; then
64
- git clone $ANSIBLE_REPO $ANSIBLE_DIRECTORY
65
+ git clone $ANSIBLE_REPO $ANSIBLE_DIRECTORY
65
66
66
- # if we're part of a build we should checkout the supplied SHA
67
- if [[ -n " $GITHUB_SHA " ]]; then
68
- git checkout " $GITHUB_SHA "
69
- fi
67
+ # if we're part of a build we should checkout the supplied SHA
68
+ if [[ -n " $GITHUB_SHA " ]]; then
69
+ git checkout " $GITHUB_SHA "
70
+ fi
70
71
fi
71
72
72
73
if [[ -z " $NO_PROVISION " ]]; then
73
- # Provision the box
74
- ansible-playbook --ask-become-pass --become-method=sudo -i $ANSIBLE_DIRECTORY /inventory $ANSIBLE_DIRECTORY /playbook.yml
74
+ # Provision the box
75
+ ansible-playbook --ask-become-pass --become-method=sudo -i $ANSIBLE_DIRECTORY /inventory $ANSIBLE_DIRECTORY /playbook.yml
75
76
fi
76
-
0 commit comments