Making things work...

This commit is contained in:
Gene Liverman 2017-06-03 11:10:10 -07:00
parent 91110e2534
commit 77fce59b08
11 changed files with 137 additions and 22 deletions

24
bin/bootstrap.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/bash
echo 'This script takes care of getting dots ready to use'
echo 'Enter the number of the task you want to perform:'
PS3='Task: '
select TASK in 'Mac setup' 'EL setup' 'Quit';
do
case $TASK in
'Mac setup' )
~/.dotfile/bin/bootstrap/bootstrap_mac.sh now
;;
'EL setup' )
~/.dotfile/bin/bootstrap/bootstrap_el.sh now
;;
'Quit' )
echo 'Exiting'
exit 0
;;
* )
echo 'Invalid selection, quitting.'
exit 1
;;
esac
done

21
bin/bootstrap/bootstrap_mac.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash
if [[ $1 == 'now' ]]; then
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install dot's dependencies
/usr/local/bin/brew install ruby cmake pkg-config
/usr/local/bin/gem install --no-ri --no-rdoc bundler
# Make dot usable
cd ~/.dotfiles
/usr/local/bin/bundle install
# Install Puppet modules
/usr/local/bin/bundle exec rake dots:run_r10k
# Display tasks that can be run
echo 'These are the task that can now be executed:'
/usr/local/bin/bundle exec rake -T |grep --color=never 'rake dots'
fi