update
This commit is contained in:
parent
7f09c707cf
commit
17b262f5f8
@ -1,8 +1,39 @@
|
|||||||
(setq emacs-config-name
|
(defun install-emacs-startkit (name directory)
|
||||||
(let ((config-name (getenv "EMACS_CONFIG")))
|
(let ((startkit-info
|
||||||
(if config-name
|
'((doom-emacs .
|
||||||
config-name
|
(lambda (dir)
|
||||||
".emacs.d")))
|
(concat "git clone git@github.com:shen390s/doom-emacs.git "
|
||||||
|
dir " && cd " dir " && "
|
||||||
|
" cp init.example.el init.el && "
|
||||||
|
" make install ")))
|
||||||
|
(frontmacs .
|
||||||
|
(lambda (dir)
|
||||||
|
(concat "mkdir -p " dir " && cd " dir " && "
|
||||||
|
"wget https://github.com/shen390s/frontmacs/blob/master/scripts/init-frontmacs.el && "
|
||||||
|
"echo \"(load (expand-file-name \"init-frontmacs.el\" user-emacs-directory))\" >>init.el")))
|
||||||
|
(graphane .
|
||||||
|
(lambda (dir)
|
||||||
|
(concat "git clone git@github.com:shen390s/dotfiles-emacs.git " dir)))
|
||||||
|
(ohai-emacs .
|
||||||
|
(lambda (dir)
|
||||||
|
(concat "git clone git@github.com:shen390s/ohai-emacs.git " dir)))
|
||||||
|
(prelude .
|
||||||
|
(lambda (dir)
|
||||||
|
(concat "git clone git@github.com:shen390s/prelude.git " dir)))
|
||||||
|
(spacemacs .
|
||||||
|
(lambda (dir)
|
||||||
|
(concat "git clone https://github.com/syl20bnr/spacemacs.git " dir))))))
|
||||||
|
(let ((installer (funcall (cdr (assoc (intern name) startkit-info)) directory)))
|
||||||
|
(let ((output (shell-command-to-string installer)))
|
||||||
|
(message "%s" output)))))
|
||||||
|
|
||||||
|
(setq emacs-start-kit
|
||||||
|
(let ((start-kit (getenv "EMACS_STARTKIT")))
|
||||||
|
(if start-kit
|
||||||
|
start-kit
|
||||||
|
"spacemacs")))
|
||||||
|
|
||||||
|
(setq emacs-config-name emacs-start-kit)
|
||||||
|
|
||||||
(setq emacs-config-directory
|
(setq emacs-config-directory
|
||||||
(let ((config-dir (getenv "EMACS_CONFIG_DIR")))
|
(let ((config-dir (getenv "EMACS_CONFIG_DIR")))
|
||||||
@ -13,6 +44,12 @@
|
|||||||
|
|
||||||
(setq user-emacs-directory emacs-config-directory)
|
(setq user-emacs-directory emacs-config-directory)
|
||||||
|
|
||||||
|
(setq emacs-init-file
|
||||||
|
(expand-file-name "init.el" user-emacs-directory))
|
||||||
|
|
||||||
|
(if (not (file-exists-p emacs-init-file))
|
||||||
|
(install-emacs-startkit emacs-start-kit emacs-config-directory))
|
||||||
|
|
||||||
(let ((init-file (expand-file-name "init.el" user-emacs-directory)))
|
(let ((init-file (expand-file-name "init.el" user-emacs-directory)))
|
||||||
(when (file-exists-p init-file)
|
(when (file-exists-p init-file)
|
||||||
(load-file init-file)))
|
(load-file init-file)))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user