-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·80 lines (62 loc) · 1.56 KB
/
install.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
if [[ $CODESPACES != '' ]]; then
printf "\n✅ Deferring to devcontainer.\n\n"
exit
fi
# Determine if this is being setup for a desktop computer.
platform=$(uname)
environment=$DISPLAY
if [[ $environment != '' || $platform == 'Darwin' ]]; then
environment='desktop'
fi
function install {
if [ -d ../$1 ]; then
cd ../$1
git pull origin master
else
git clone git@github.com:ianwalter/$1.git ../$1
cd ../$1
fi
./install.sh $2
}
# Determine the absolute path of what the ianwalter directory should be.
ianwalter_dir=$HOME/ianwalter
if [[ ! -d $ianwalter_dir ]]; then
# Create the ianwalter directory.
mkdir $ianwalter_dir
# Move the dotfiles directory to the ianwalter directory.
cd ..; sudo mv dotfiles $ianwalter_dir
fi
# Change to the dotfiles directory.
cd $ianwalter_dir/dotfiles
# Install Aptitude and Snapcraft packages.
if [[ $platform == 'Linux' ]]; then
install dotapt
fi
# Install Homebrew and Linuxbrew packages.
install dotbrew
# Install zsh configuration.
install dotzsh
# Install npm global packages.
install dotnpm
# Install vim configuration.
install dotvim
# Install GPG configuration.
install dotgpg
# Install git configuration.
install dotgitconfig
# Install fonts configuration.
if [[ $environment == 'desktop' ]]; then
install dotfonts
fi
# Configure VS Code if installed.
if [[ `which code` ]]; then
install dotvscode
fi
# Install iTerm2 configuration.
if [[ $platform == 'Darwin' ]]; then
install dotiterm
fi
# Reload the shell so that changes take effect immediately.
cd ../dotfiles
exec $SHELL -l