-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.zsh
More file actions
executable file
·46 lines (33 loc) · 1.03 KB
/
Copy pathinit.zsh
File metadata and controls
executable file
·46 lines (33 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
#!/usr/bin/env zsh
STRICT=false
source ./install/utils.zsh
header "Installing your dotfiles"
# Is this a work machine?
while [[ ! "$use_strict" =~ ^[yYnN]$ ]]; do read "use_strict?$(pretty_print "Is this a work machine? (y/n): ")"; done
case $use_strict in
y|Y) STRICT=true;;
n|N) STRICT=false;;
esac
if $STRICT; then
export HOMEBREW_STRICT=true
echo ''
warn "Strict mode enabled" "yellow"
fi
header "Setting up environment"
if ! [[ -v XDG_CONFIG_HOME ]]; then
warn '`$XDG_CONFIG_HOME` not set. Setting to `$HOME`/.config' yellow
export XDG_CONFIG_HOME=$HOME/.config
fi
# Ensure $HOME/Code exists
if ! [[ -d $HOME/Code ]]; then
warn '`$HOME/Code` directory not found. Creating it' yellow
mkdir $HOME/Code
else
success '$HOME/Code directory already exists'
fi
source ./install/dependencies.zsh # Install dependencies
source ./install/apps.zsh # Install apps and vscode extensions
# Symlink dotfiles
header "Symlinking dotfiles"
env RCRC=$HOME/dotfiles/rcrc rcup
source ./install/development.zsh # Install development tools