blob: b25faee0cf2a57fa64c9d45394c6dbb965dfe8da (
plain)
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
|
#!/usr/bin/env bash
set -e
# Ensure the Command Line Tools for Xcode is installed
if ! xcode-select -p >/dev/null 2>&1; then
xcode-select --install
fi
# Install package manager for macOS
if ! command -v brew >/dev/null 2>&1; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
basedir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
dotfiles="$HOME/.dotfiles"
# Ensure the XDG user-specific configurations directory exists
mkdir -p "$HOME/.config"
# Shortcut to dotfiles directory on home directory
if [ ! -e "$dotfiles" ]; then
ln -s "$basedir" "$dotfiles"
fi
# Install dependencies
brew bundle --file $dotfiles/Brewfile
# Publish zsh configurations
if [ ! -e "$HOME/.zshrc" ]; then
ln -s "$dotfiles/.zshrc" "$HOME/.zshrc"
fi
# Publish git configurations
if [ ! -e "$HOME/.config/git" ]; then
ln -s "$dotfiles/git" "$HOME/.config/git"
fi
# Publish kitty configurations
if [ ! -e "$HOME/.config/kitty" ]; then
ln -s "$dotfiles/kitty" "$HOME/.config/kitty"
fi
# Publish Neovim configurations
if [ ! -e "$HOME/.config/nvim" ]; then
ln -s "$dotfiles/nvim" "$HOME/.config/nvim"
fi
# Publish Karabiner configurations
if [ ! -e "$HOME/.config/karabiner" ]; then
ln -s "$dotfiles/karabiner" "$HOME/.config/karabiner"
fi
# Publish newsboat configurations
if [ ! -e "$HOME/.newsboat" ]; then
ln -s "$dotfiles/.newsboat" "$HOME/.newsboat"
fi
# Install verion manager for node.js
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# Configure the macOS
bash "$dotfiles/.macos"
|