Created
February 10, 2011 02:48
-
-
Save bostonaholic/819825 to your computer and use it in GitHub Desktop.
Rakefile for installing leiningen on OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
task :default => [:lein] | |
desc "download leiningen script and create symbolic link to /usr/local/bin/lein" | |
task :lein do | |
leiningen | |
end | |
def curl_leiningen(source_file) | |
`curl -OL https://github.com/technomancy/leiningen/raw/stable/bin/lein > #{source_file}` | |
end | |
def leiningen | |
current_dir = File.dirname(__FILE__) | |
source_file = File.join(current_dir, 'lein') | |
curl_leiningen(source_file) | |
`chmod +x lein` | |
target_file = File.join(File.expand_path('/usr/local/bin/'), 'lein') | |
`sudo ln -s -Ff #{source_file} #{target_file}` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install
or