shoestrap/master-cookbook

99 lines
1.9 KiB
Plaintext
Raw Permalink 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)
PROJECT_DIR=$(pwd)
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
if ! is_installed "packages" || prompt_yn "Reinstall packages?" ; then
install_packages=true
fi
build_vim=false
2013-08-08 03:23:13 +00:00
if [ "$PACKAGE_MANAGER" == 'apt-get' ]; then
# Optional
is_installed "build-vim"
2013-08-08 03:23:13 +00:00
if prompt_yn "Compile vim?" ; then
build_vim=true
2013-08-08 03:23:13 +00:00
fi
fi
build_neovim=false
if ! command_exist 'nvim' && prompt_yn "Build Neovim?" ; then
build_neovim=true
2015-06-03 20:53:41 +00:00
fi
build_fish=false
if ! command_exist 'fish' && prompt_yn "Build Fish?" ; then
build_fish=true
2013-08-08 03:23:13 +00:00
fi
# Optional
install_sfdc=false
2017-07-25 21:19:59 +00:00
if ! is_installed "salesforce" && prompt_yn "Install Salesforce tools?" ; then
2013-08-08 03:23:13 +00:00
install_sfdc=true
fi
# Optional
install_golang=false
2017-07-25 21:19:59 +00:00
if ! command_exist 'go' && prompt_yn "Install Go?" ; then
2013-08-08 03:23:13 +00:00
install_golang=true
fi
2012-03-21 20:05:28 +00:00
### Run recipes
if $install_packages ; then
recipe 'packages'
set_installed "packages"
2015-06-03 20:53:20 +00:00
fi
2013-08-08 03:23:13 +00:00
recipe 'dotfiles'
recipe 'bin'
recipe 'git'
recipe 'vim-settings'
recipe 'fish'
2013-08-08 03:23:13 +00:00
git submodule init
git submodule update
if $build_vim ; then
recipe 'build-vim'
set_installed "build-vim"
2013-08-08 03:23:13 +00:00
fi
if $build_neovim ; then
recipe 'build-neovim'
2015-06-03 20:53:41 +00:00
set_installed "neovim"
fi
if $build_fish ; then
recipe 'build-fish'
set_installed "build-fish"
2013-08-08 03:23:13 +00:00
fi
if $install_sfdc ; then
recipe 'salesforce'
set_installed 'salesforce'
fi
if $install_golang ; then
recipe 'golang'
set_installed 'golang'
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