-
Notifications
You must be signed in to change notification settings - Fork 3
/
main-cookbook
executable file
·115 lines (94 loc) · 2.38 KB
/
main-cookbook
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/bash
# Initialization - DO NOT REMOVE
. helpers/initialize
##############################################################
### Customizations start here ################################
##############################################################
# Get current directory for future use in links
cd "$(dirname "$0")" || { echo "Could not change directory to $0"; exit 1;}
PROJECT_DIR=$(pwd)
export PROJECT_DIR
detect_package_manager
init_paths_and_vars
# Do prompting early to make longer install easier
install_packages=false
if ! is_installed 'packages' || prompt_yn 'Reinstall packages?' ; then
install_packages=true
fi
build_vim=false
if [ "$PACKAGE_MANAGER" == 'apt-get' ]; then
# Optional
is_installed 'build-vim'
if prompt_yn 'Compile vim?' ; then
build_vim=true
fi
fi
build_neovim=false
if ! command_exist 'nvim' && prompt_yn 'Build Neovim?' ; then
build_neovim=true
fi
install_rustup=false
if ! command_exist 'rustup' && prompt_yn 'Install rustup?' ; then
install_rustup=true
fi
# Optional
install_sfdc=false
# if ! is_installed "salesforce" && prompt_yn "Install Salesforce tools?" ; then
# install_sfdc=true
# fi
install_ui_terms=false
if ! is_installed 'ui_terms' && prompt_yn 'Install UI terminals?' ; then
install_ui_terms=true
fi
install_newunix=false
if ! is_installed 'newunix' && prompt_yn 'Install "new unix" utils (eg. dust, dog, duf)?' ; then
install_newunix=true
fi
### Run recipes
if $install_packages ; then
recipe 'packages'
set_installed 'packages'
fi
if $install_newunix ; then
recipe 'newunix'
set_installed 'newunix'
fi
recipe 'dotfiles'
recipe 'bin'
if [ "$(uname)" == 'Darwin' ]; then
recipe 'mac-files'
recipe 'mac-bin'
fi
recipe 'git'
recipe 'vim-settings'
if ! is_installed 'golang'; then
recipe 'golang'
set_installed 'golang'
fi
recipe 'fish'
if $install_ui_terms ; then
recipe 'alacritty'
recipe 'kitty'
set_installed 'ui_terms'
fi
git submodule init
git submodule update
if $install_rustup ; then
recipe 'rust'
set_installed 'rustup'
fi
if $build_vim ; then
recipe 'build-vim'
set_installed 'build-vim'
fi
if $build_neovim ; then
recipe 'build-neovim'
set_installed 'neovim'
fi
if $install_sfdc ; then
recipe 'salesforce'
set_installed 'salesforce'
fi
### Show the Finished banner
finished
# vim: set tabstop=2:softtabstop=2:shiftwidth=2:expandtab