From a46c02c5c9d2adb224c251679a4f87c69ad24b30 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sat, 10 Sep 2011 14:55:45 +0200 Subject: [PATCH] Add support for el-get-master-branch in el-get-install.el for easier "developper" install. --- README.asciidoc | 17 +++++++++++++++++ el-get-install.el | 25 +++++++++++++------------ 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 2f737b1fd..070824481 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -73,6 +73,23 @@ avoid this with the following snippet instead: See next section for details about how to setup you emacs so that it's able to benefit from +el-get+ automatically. +== How to install the developer version (master branch)? + +The 'lazy installer' uses the default +el-get-install.el+ file which targets +the +2.stable+ branch. To install el-get directly on the +master+ branch, +summon the +el-get-master-branch+ variable into existence: + +-------------------------------------- +;; So the idea is that you copy/paste this code into your *scratch* buffer, +;; hit C-j, and you have a working developper edition of el-get. +(url-retrieve + "https://raw.github.com/dimitri/el-get/master/el-get-install.el" + (lambda (s) + (let (el-get-master-branch) + (end-of-buffer) + (eval-print-last-sexp)))) +-------------------------------------- + == Basic usage Now that +el-get+ is installed, simply use +M-x el-get-install+ and pick diff --git a/el-get-install.el b/el-get-install.el index 352cc8156..7bc355c2f 100644 --- a/el-get-install.el +++ b/el-get-install.el @@ -51,19 +51,20 @@ (error "Couldn't clone el-get from the Git repository: %s" url)) ;; switch branch if we have to - (let* ((branch (plist-get (with-temp-buffer - (insert-file-contents-literally - (expand-file-name "recipes/el-get.rcp" pdir)) - (read (current-buffer))) - :branch)) - (branch (when branch (concat "origin/" branch))) - (default-directory pdir) - (bstatus - (when branch - (call-process git nil `(,buf t) t "checkout" "-t" branch)))) + (unless (boundp 'el-get-master-branch) + (let* ((branch (plist-get (with-temp-buffer + (insert-file-contents-literally + (expand-file-name "recipes/el-get.rcp" pdir)) + (read (current-buffer))) + :branch)) + (branch (when branch (concat "origin/" branch))) + (default-directory pdir) + (bstatus + (when branch + (call-process git nil `(,buf t) t "checkout" "-t" branch)))) - (when (and branch (not (zerop bstatus))) - (error "Couldn't `git checkout -t %s`" branch))) + (when (and branch (not (zerop bstatus))) + (error "Couldn't `git checkout -t %s`" branch)))) (load (concat pdir package ".el")) (el-get-post-install "el-get")