-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·73 lines (65 loc) · 2 KB
/
install.sh
File metadata and controls
executable file
·73 lines (65 loc) · 2 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env bash
# Display ASCII art
cat << "EOF"
___ ____ __ _ ___ __ ____ __
/ _ \___ / _(_) /__ ____ ( )___ / _ \___ / /_/ _(_) /__ ___
/ // / -_) _/ / / _ `/ _ \|/(_-< / // / _ \/ __/ _/ / / -_|_-<
/____/\__/_//_/_/\_,_/_//_/ /___/ /____/\___/\__/_//_/_/\__/___/
EOF
echo "Please choose a configuration:"
echo "1) Lightweight (Essentials only)"
echo "2) Developer/Engineering Config"
echo "3) Productivity/Full Config"
echo "4) Quit"
read -rp "Enter the number of your choice: " config_choice
case $config_choice in
1)
configtemplate="lightweight"
;;
2)
configtemplate="developer"
;;
3)
configtemplate="home"
;;
4)
exit 0
;;
*)
echo "Invalid choice, defaulting to Bare Bones"
configtemplate="lightweight"
;;
esac
export CONFIG=$configtemplate
echo "You chose this configuration: $config_choice ($configtemplate)"
echo "Configuring Git"
source install/git.sh
echo "Installing dotfiles"
source install/link.sh
echo "Initializing submodule(s)"
git submodule update --init --recursive
if [ "$(uname)" == "Darwin" ]; then
echo "Running on OSX"
source install/brew.sh
echo "Install Ansible..."
if [[ $(uname -m) == 'arm64' ]]; then
/opt/homebrew/bin/brew install ansible
else
/usr/local/Homebrew/bin/brew install ansible
fi
echo "Configuring Mac..."
if [[ $(uname -m) == 'arm64' ]]; then
/opt/homebrew/bin/ansible-playbook defilan-osconfig/playbook.yml -e "config=$configtemplate"
else
/usr/local/Homebrew/bin/ansible-playbook defilan-osconfig/playbook.yml -e "config=$configtemplate"
fi
elif [ "$(uname)" == "Linux" ]; then
echo "Running on Linux"
echo "Install Ansible..."
sudo apt-get install ansible
echo "Configuring Linux..."
ansible-playbook defilan-osconfig/playbook.yml -e "config=$configtemplate"
fi
echo "creating vim directories"
mkdir -p ~/.vim-tmp
echo "Done."