forked from sobolevn/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·66 lines (50 loc) · 1.64 KB
/
install
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
#!/usr/bin/env bash
set -e
# Exporting the specific shell we want to work with:
SHELL='/bin/zsh'
export SHELL
if [[ $(xcode-select --version) ]]; then
echo Xcode command tools already installed
else
echo "Installing Xcode commandline tools"
$(xcode-select --install)
echo "Installing Rosetta 2"
$(softwareupdate --install-rosetta --agree-to-license)
fi
if [ -d ~/.oh-my-zsh ] ; then
echo "Attempting to update Oh My ZSH"
omz update
else
echo "Attempting to install Oh My ZSH"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
fi
export PATH="$PATH:/opt/homebrew/bin"
if [[ $(brew --version) ]] ; then
echo "Attempting to update Homebrew from version $(brew --version)"
brew update
else
echo "Attempting to install Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Install / Upgrade RVM
curl -sSL https://get.rvm.io | bash -s stable
# Standard dotbot pre-configuration:
readonly DOTBOT_DIR='dotbot'
readonly DOTBOT_BIN='bin/dotbot'
readonly BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly ARGS="$@"
cd "$BASEDIR"
git submodule sync --quiet --recursive
git submodule update --init --recursive
# Linking dotfiles:
run_dotbot () {
local config
config="$1"
"$BASEDIR/$DOTBOT_DIR/$DOTBOT_BIN" \
-d "$BASEDIR" \
--plugin-dir dotbot-brewfile \
-c "$config" $ARGS
}
run_dotbot 'steps/terminal.yml' || true
run_dotbot 'steps/dependencies.yml' || true