Added support for Linux Mint

This commit is contained in:
Gene Liverman 2017-09-18 19:01:57 -07:00 committed by Gene Liverman
parent e23ea50d4b
commit b0ec3a08ba
23 changed files with 337 additions and 87 deletions

View file

@ -3,7 +3,7 @@ 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';
select TASK in 'Mac setup' 'EL setup' 'Mint setup' 'Quit';
do
case $TASK in
'Mac setup' )
@ -12,6 +12,9 @@ do
'EL setup' )
~/.dotfiles/bin/bootstrap/bootstrap_el.sh now
;;
'Mint setup' )
~/.dotfiles/bin/bootstrap/bootstrap_mint.sh now
;;
'Quit' )
echo 'Exiting'
exit 0

0
bin/bootstrap/bootstrap_el.sh Normal file → Executable file
View file

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

@ -0,0 +1,21 @@
#!/bin/bash
if [[ $1 == 'now' ]]; then
# Install dot's dependencies
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.4 ruby2.4-dev ruby-switch cmake build-essential
sudo ruby-switch --set ruby2.4
sudo gem install --no-ri --no-rdoc bundler
# Make dot usable
cd ~/.dotfiles
bundle install
# Install Puppet modules
bundle exec rake dots:run_r10k
# Display tasks that can be run
echo 'These are the task that can now be executed:'
bundle exec rake -T |grep --color=never 'rake dots'
fi

View file

@ -10,7 +10,7 @@ cmd = TTY::Command.new
@home = File.expand_path('~')
@dotroot = File.dirname(File.dirname(File.expand_path($PROGRAM_NAME)))
@excludes = %w[mac nix ssh]
@excludes = %w[linux mac nix ssh]
@files_copy = Dir.glob("#{@dotroot}/copy/*")
@files_link = Dir.glob("#{@dotroot}/link/*")
@ssh_link = Dir.glob("#{@dotroot}/link/ssh/*")
@ -30,7 +30,7 @@ elsif OS.mac?
@files_link.concat Dir.glob("#{@dotroot}/link/mac/*")
elsif OS.linux?
puts 'It seems you are on Linux'
@files_link.concat Dir.glob("#{@dotroot}/link/linux/*")
else
abort("I'm not sure what to do with this OS...") unless OS.posix?