-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·50 lines (43 loc) · 1.29 KB
/
bootstrap.sh
File metadata and controls
executable file
·50 lines (43 loc) · 1.29 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 sh
cd "$(dirname "$0")" || exit 1
doIt() {
git pull origin main
rsync --exclude ".git/" --exclude ".github/" --exclude "init/" --exclude "bin/" \
--exclude ".DS_Store" --exclude ".editorconfig" \
--exclude ".gitignore" --exclude "bootstrap.sh" \
--exclude "README.md" --exclude "LICENSE.md" -avh --no-perms . ~
# . "$HOME/.zshrc"
}
if [ "$1" = "--force" ] || [ "$1" = "-f" ]; then
doIt
else
# Homebrew
printf "🍺 Install Homebrew and its formulae? (y/N) "
read -r runswitch
case "$runswitch" in
y|Y|yes|YES) . init/brew/install-brew-formulae.sh ;;
*) echo "Skipping Homebrew." ;;
esac
# dotfiles
printf "🚨 Installing dotfiles. This will overwrite existing files in your home directory. Are you sure? (y/N) "
read -r runswitch
case "$runswitch" in
y|Y|yes|YES) doIt ;;
*) echo "Skipping installation." ;;
esac
# zsh
printf "🙃 Install ohmyzsh and some plugins? (y/N) "
read -r runswitch
case "$runswitch" in
y|Y|yes|YES) . init/terminal/install-zsh.sh ;;
*) echo "Skipping ohmyzsh." ;;
esac
# Node modules
printf "🟨 Install Node modules? (y/N) "
read -r runswitch
case "$runswitch" in
y|Y|yes|YES) . init/npm/install-node-modules.sh ;;
*) echo "Skipping Node modules." ;;
esac
fi
unset doIt