-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
executable file
·46 lines (40 loc) · 1.3 KB
/
bootstrap.sh
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
#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE[0]}")" || exit;
function 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 . ~;
#source "$HOME/.zshrc";
}
if [ "$1" == "--force" ] || [ "$1" == "-f" ]; then
doIt;
else
# Homebrew
read -r -p "🍺 Install Homebrew and its formulae? (y/N) " runswitch
case "$runswitch" in
y|yes ) source init/brew/install-brew-formulae.sh;;
* ) echo "Skipping Homebrew.";;
esac
# dotfiles
read -r -p "🚨 Installing dotfiles. This will overwrite existing files in your home directory. Are you sure? (y/N) " runswitch
case "$runswitch" in
y|yes ) doIt;;
* ) echo "Skipping installation.";;
esac
# zsh
read -r -p "🙃 Install ohmyzsh and some plugins? (y/N) " runswitch
case "$runswitch" in
y|yes )
source init/terminal/install-zsh.sh;;
* ) echo "Skipping ohmyzsh.";;
esac
# Node modules
read -r -p "🟨 Install Node modules? (y/N) " runswitch
case "$runswitch" in
y|yes ) source init/npm/install-node-modules.sh;;
* ) echo "Skipping Node modules.";;
esac
fi;
unset doIt;