Skip to content

Instantly share code, notes, and snippets.

@blakesmith
Created April 23, 2012 21:05
Show Gist options
  • Save blakesmith/2473854 to your computer and use it in GitHub Desktop.
Save blakesmith/2473854 to your computer and use it in GitHub Desktop.
Leiningen install crate
(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