-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall
More file actions
executable file
·50 lines (38 loc) · 1.11 KB
/
install
File metadata and controls
executable file
·50 lines (38 loc) · 1.11 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
#!/usr/bin/env bash
set -e
echo ''
echo 'Check for xcode command line tools'
if [ -n "$(xcode-select -v)" ]; then
echo 'xcode command line tools installed, moving on...'
else
echo 'xcode not installed'
xcode-select --install
fi
echo 'Checking for homebrew'
if ! hash brew; then
echo 'brew not installed'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo 'brew is installed, moving on...'
fi
echo 'Check for brew zsh'
if brew ls --versions zsh > /dev/null; then
echo 'brew zsh found, moving on...'
else
echo 'installing brew zsh'
brew install zsh
fi
echo 'Setup dotfiles'
DOTFILES_ROOT="${HOME}/.dotfiles"
DOTFILES_REPO="git@github.com:heymackey/dotfiles.git"
if [[ ! -d ${DOTFILES_ROOT} ]]; then
echo "Cloning repo"
git clone ${DOTFILES_REPO} ${DOTFILES_ROOT}
fi
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd $DOTFILES_ROOT
git submodule update --init --recursive "${DOTBOT_DIR}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"