-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·68 lines (58 loc) · 1.81 KB
/
bootstrap.sh
File metadata and controls
executable file
·68 lines (58 loc) · 1.81 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash
set -e
has_command() {
command -v "$1" > /dev/null 2>&1
}
is_dir() {
[ -d "$1" ]
}
echo "==> Homebrew をインストール"
if ! has_command brew; then
# v5.0.13 時点
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv bash)"
else
echo "✓ Homebrew はインストール済み"
fi
# divvy が intel 用にビルドされているので必要
echo "==> Rosetta をインストール"
if ! is_dir "/Library/Apple/usr/libexec/oah"; then
softwareupdate --install-rosetta --agree-to-license
else
echo "✓ Rosetta はインストール済み"
fi
echo "==> パッケージをインストール"
brew bundle -v
echo "==> Doom Emacs を clone"
DOT_EMACS_D_PATH="$HOME/.emacs.d"
DOOM_EMACS_WAS_CLONED=false
if ! is_dir "$DOT_EMACS_D_PATH"; then
# 2025/11/29 時点
git clone https://github.com/hlissner/doom-emacs "$DOT_EMACS_D_PATH"
DOOM_EMACS_WAS_CLONED=true
else
echo "✓ Doom Emacs は clone 済み"
fi
echo "===> fisher をインストール"
if has_command fish && ! fish -c 'type -q fisher'; then
# fisher v4.4.5 時点
fish -c '
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source
fisher install jorgebucaran/fisher
fisher install oh-my-fish/theme-bobthefish
'
else
echo "✓ fisher はインストール済み"
fi
echo "===> 設定ファイルを配置"
mkdir -p ~/.ssh
mkdir -p "$DOT_EMACS_D_PATH/.local/etc/ispell"
stow --adopt -v fish doom ghostty git ssh mise
# --adopt での変更を元に戻す
git restore .
echo "===> Doom Emacs をインストール"
if "$DOOM_EMACS_WAS_CLONED"; then
"$DOT_EMACS_D_PATH/bin/doom" install
else
echo "✓ Doom Emacs はインストール済み"
fi