-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
34 lines (24 loc) · 707 Bytes
/
install.sh
File metadata and controls
34 lines (24 loc) · 707 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
#!/usr/bin/env bash
set -eu -o pipefail
REPO="https://github.com/stefanroex/dotfiles.git"
TARGET_DIR="$HOME/.dotfiles"
if ! xcode-select --print-path &> /dev/null; then
xcode-select --install &> /dev/null
until xcode-select --print-path &> /dev/null; do
sleep 5
done
fi
if test ! $(which brew); then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
if test ! $(which ansible); then
brew install ansible
fi
if [ ! -d "$TARGET_DIR" ]; then
mkdir -p "$TARGET_DIR" && git clone "$REPO" "$TARGET_DIR"
fi
cd "$TARGET_DIR"
git pull
brew install --cask microsoft-teams
ansible-playbook main.yml