Created
April 23, 2012 21:05
-
-
Save blakesmith/2473854 to your computer and use it in GitHub Desktop.
Leiningen install crate
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
(ns pallet.crate.lein | |
(:require [pallet.action.remote-file :as remote-file])) | |
(def default-install-path "/usr/local/bin") | |
(def script-url "https://raw.github.com/technomancy/leiningen/stable/bin/lein") | |
(defn- install-script | |
[session install-path] | |
(-> session | |
(remote-file/remote-file | |
(format "%s/lein" install-path) | |
:url script-url | |
:mode 755))) | |
(defn lein | |
[session & {:keys [install-path] | |
:or {install-path default-install-path} | |
:as opts}] | |
(-> session | |
(install-script install-path))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment