Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 00a8814d authored by Dimitri Fontaine's avatar Dimitri Fontaine

Test for already installed el-get in el-get-install.el rather than in the doc snippet.

parent 90aee18d
......@@ -17,13 +17,11 @@ Here's the 'lazy installer':
--------------------------------------
;; So the idea is that you copy/paste this code into your *scratch* buffer,
;; hit C-j, and you have a working el-get.
(if (require 'el-get nil t)
(message "el-get is already installed, try M-x el-get-update")
(url-retrieve
"https://github.com/dimitri/el-get/raw/master/el-get-install.el"
(lambda (s)
(end-of-buffer)
(eval-print-last-sexp))))
(url-retrieve
"https://github.com/dimitri/el-get/raw/master/el-get-install.el"
(lambda (s)
(end-of-buffer)
(eval-print-last-sexp)))
--------------------------------------
You have to type +C-j+ with the cursor at the end of the last line, but
......
......@@ -17,29 +17,31 @@
;; So the idea is that you copy/paste this code into your *scratch* buffer,
;; hit C-j, and you have a working el-get.
(let* ((el-get-root
(file-name-as-directory
(concat (file-name-as-directory user-emacs-directory) "el-get")))
(dummy (unless (file-directory-p el-get-root)
(make-directory el-get-root t)))
(package "el-get")
(buf (switch-to-buffer "*el-get bootstrap*"))
(pdir (file-name-as-directory (concat el-get-root package)))
(git (or (executable-find "git")
(error "Unable to find `git'")))
(url "git://github.com/dimitri/el-get.git")
(default-directory el-get-root)
(process-connection-type nil) ; pipe, no pty (--no-progress)
(if (require 'el-get nil t)
(message "el-get is already installed, try M-x el-get-update")
(let* ((el-get-root
(file-name-as-directory
(concat (file-name-as-directory user-emacs-directory) "el-get")))
(dummy (unless (file-directory-p el-get-root)
(make-directory el-get-root t)))
(package "el-get")
(buf (switch-to-buffer "*el-get bootstrap*"))
(pdir (file-name-as-directory (concat el-get-root package)))
(git (or (executable-find "git")
(error "Unable to find `git'")))
(url "git://github.com/dimitri/el-get.git")
(default-directory el-get-root)
(process-connection-type nil) ; pipe, no pty (--no-progress)
;; First clone el-get
(status
(call-process git nil `(,buf t) t "--no-pager" "clone" "-v" url package)))
;; First clone el-get
(status
(call-process git nil `(,buf t) t "--no-pager" "clone" "-v" url package)))
(unless (zerop status)
(error "Couldn't get el-get from the Git repository"))
(unless (zerop status)
(error "Couldn't get el-get from the Git repository"))
(load (concat pdir package ".el"))
(el-get-post-install "el-get" 'noerror)
(with-current-buffer buf
(goto-char (point-max))
(insert "\nCongrats, el-get is installed and ready to serve!")))
(load (concat pdir package ".el"))
(el-get-post-install "el-get" 'noerror)
(with-current-buffer buf
(goto-char (point-max))
(insert "\nCongrats, el-get is installed and ready to serve!"))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment