parent
0511aea62f
commit
7241f2b4d1
23
bootstrap.el
23
bootstrap.el
|
@ -1,9 +1,16 @@
|
|||
(unless (file-exists-p (file-name-concat user-emacs-directory "init" "strapped.el"))
|
||||
(make-directory (file-name-concat user-emacs-directory "init") 'make-parents)
|
||||
(require 'org)
|
||||
(org-babel-tangle-file (file-name-concat
|
||||
(file-name-directory (file-truename "~/.emacs"))
|
||||
"config.org"))
|
||||
(restart-emacs))
|
||||
(let ((strap-file (file-name-concat user-emacs-directory "init" "strapped.el")))
|
||||
;; checks for our tangled bootstrap elisp file
|
||||
;; if it doesnt exist, we create the emacs.d/init directory
|
||||
;; loads org, tangles our config and finally restarts the editor
|
||||
(unless (file-exists-p strap-file)
|
||||
(make-directory (file-name-concat user-emacs-directory "init") 'make-parents)
|
||||
(require 'org)
|
||||
(org-babel-tangle-file (file-name-concat
|
||||
(file-name-directory (file-truename "~/.emacs"))
|
||||
"config.org"))
|
||||
(restart-emacs))
|
||||
|
||||
(load (file-name-concat user-emacs-directory "init" "strapped.el"))
|
||||
;; if the file exists, we go ahead and load it.
|
||||
;; it will automatically tangle the config file
|
||||
;; and recreate itself as needed
|
||||
(load strap-file nil 'no-message))
|
||||
|
|
Loading…
Reference in New Issue