shoestrap/main-cookbook

125 lines
2.6 KiB
Plaintext
Raw Normal View History

2012-03-21 20:05:28 +00:00
#!/bin/bash
# Initialization - DO NOT REMOVE
. helpers/initialize
##############################################################
### Customizations start here ################################
##############################################################
2013-08-08 03:23:13 +00:00
# Get current directory for future use in links
cd "$(dirname "$0")" || { echo "Could not change directory to $0"; exit 1;}
2013-08-08 03:23:13 +00:00
PROJECT_DIR=$(pwd)
export PROJECT_DIR
2012-03-21 20:05:28 +00:00
2013-08-08 03:23:13 +00:00
detect_package_manager
2012-03-21 20:05:28 +00:00
2013-08-08 03:23:13 +00:00
init_paths_and_vars
# Do prompting early to make longer install easier
install_packages=false
2022-09-28 18:04:40 +00:00
if ! is_installed 'packages' || prompt_yn 'Reinstall packages?' ; then
2013-08-08 03:23:13 +00:00
install_packages=true
fi
build_vim=false
2013-08-08 03:23:13 +00:00
if [ "$PACKAGE_MANAGER" == 'apt-get' ]; then
# Optional
2022-09-28 18:04:40 +00:00
is_installed 'build-vim'
if prompt_yn 'Compile vim?' ; then
build_vim=true
2013-08-08 03:23:13 +00:00
fi
fi
build_neovim=false
2022-09-28 18:04:40 +00:00
if ! command_exist 'nvim' && prompt_yn 'Build Neovim?' ; then
build_neovim=true
2015-06-03 20:53:41 +00:00
fi
2019-04-11 20:23:36 +00:00
install_rustup=false
2022-09-28 18:04:40 +00:00
if ! command_exist 'rustup' && prompt_yn 'Install rustup?' ; then
2019-04-11 20:23:36 +00:00
install_rustup=true
fi
2013-08-08 03:23:13 +00:00
# Optional
install_sfdc=false
2022-04-05 23:54:18 +00:00
# if ! is_installed "salesforce" && prompt_yn "Install Salesforce tools?" ; then
# install_sfdc=true
# fi
2013-08-08 03:23:13 +00:00
2021-06-09 01:25:14 +00:00
install_ui_terms=false
2022-09-28 18:04:40 +00:00
if ! is_installed 'ui_terms' && prompt_yn 'Install UI terminals?' ; then
2021-06-09 01:25:14 +00:00
install_ui_terms=true
fi
2024-11-26 23:02:18 +00:00
install_nerd_fonts=false
if install_ui_terms && ! is_installed 'nerd_fonts' && prompt_yn 'Install nerd fonts?"' ; then
install_nerd_fonts=true
fi
2022-09-28 18:04:40 +00:00
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'
2022-09-28 18:04:40 +00:00
set_installed 'packages'
fi
if $install_newunix ; then
recipe 'newunix'
2023-03-08 22:58:33 +00:00
set_installed 'newunix'
2015-06-03 20:53:20 +00:00
fi
2013-08-08 03:23:13 +00:00
recipe 'dotfiles'
recipe 'bin'
if [ "$(uname)" == 'Darwin' ]; then
2019-04-10 01:16:10 +00:00
recipe 'mac-files'
recipe 'mac-bin'
fi
2013-08-08 03:23:13 +00:00
recipe 'git'
recipe 'vim-settings'
2023-03-08 22:58:55 +00:00
if ! is_installed 'golang'; then
recipe 'golang'
set_installed 'golang'
fi
recipe 'fish'
2021-06-09 01:25:14 +00:00
if $install_ui_terms ; then
recipe 'alacritty'
recipe 'kitty'
2022-09-28 18:04:40 +00:00
set_installed 'ui_terms'
2024-11-26 23:02:18 +00:00
if $install_nerd_fonts ; then
recipe 'nerd-fonts'
set_installed 'nerd_fonts'
fi
2021-06-09 01:25:14 +00:00
fi
2013-08-08 03:23:13 +00:00
git submodule init
git submodule update
2019-04-11 20:23:36 +00:00
if $install_rustup ; then
recipe 'rust'
set_installed 'rustup'
fi
if $build_vim ; then
recipe 'build-vim'
2022-09-28 18:04:40 +00:00
set_installed 'build-vim'
2013-08-08 03:23:13 +00:00
fi
if $build_neovim ; then
recipe 'build-neovim'
2022-09-28 18:04:40 +00:00
set_installed 'neovim'
2015-06-03 20:53:41 +00:00
fi
2013-08-08 03:23:13 +00:00
if $install_sfdc ; then
recipe 'salesforce'
set_installed 'salesforce'
fi
2012-03-21 20:05:28 +00:00
### Show the Finished banner
finished
2013-08-08 03:23:13 +00:00
# vim: set tabstop=2:softtabstop=2:shiftwidth=2:expandtab