-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
43 lines (36 loc) · 1.13 KB
/
Rakefile
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
require 'fileutils'
require 'rake'
require 'erb'
desc 'Bootstrap a new Mac!'
task :install do
Rake::Task['install:homebrew'].invoke
Rake::Task['install:asdf'].invoke
Rake::Task['install:ohmyzsh'].invoke
Rake::Task['install:composer'].invoke
end
desc 'Installs system requirements'
namespace :install do
desc 'Installs Homebrew'
task :homebrew do
puts 'Installing Homebrew...'
system '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
end
desc 'Installs asdf'
task :asdf do
puts 'Installing asdf...'
system 'sh -c "$(git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0)"'
end
desc 'Installs Oh My Zsh'
task :ohmyzsh do
puts 'Installing Oh My Zsh...'
system 'sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"'
end
desc 'Installs Composer'
task :composer do
puts 'Installing Composer...'
FileUtils.chmod_R "u=wrx", "install_composer.sh"
system 'sh -s "$(install_composer.sh)"'
puts 'Moving composer.phar file...'
system 'sh -c "$(mv composer.phar /usr/local/bin/composer)"'
end
end