-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·49 lines (36 loc) · 1.03 KB
/
install.sh
File metadata and controls
executable file
·49 lines (36 loc) · 1.03 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
#!/bin/sh
set -eu
DOTFILES="$HOME/.dotfiles"
REMOTE="https://github.com/rangerz/dotfiles.git"
BRANCH="main"
download_dotfiles() {
if ! command -v git >/dev/null 2>&1; then
echo "git is not installed"
exit 1
fi
if [ -d "$DOTFILES/.git" ]; then
echo "Dotfiles already installed at $DOTFILES"
exit 0
fi
echo "Cloning dotfiles into $DOTFILES"
git clone --depth=1 --single-branch --branch "$BRANCH" "$REMOTE" "$DOTFILES"
}
main() {
echo "Installing dotfiles into $DOTFILES"
download_dotfiles
# todo: support other shells
# Install zsh and oh-my-zsh
"$DOTFILES/zsh/install.sh"
"$DOTFILES/oh-my-zsh/install.sh"
# Install Homebrew and packages
"$DOTFILES/brew/install.sh"
# Set configs for shell + git + ssh + vim + mise
"$DOTFILES/shell/install.sh"
"$DOTFILES/git/install.sh"
"$DOTFILES/ssh/install.sh"
"$DOTFILES/vim/install.sh"
#"$DOTFILES/mise/install.sh"
echo "Done. Dotfiles installed in $DOTFILES"
exec zsh -l
}
main "$@"