Use doomscript instead of cli.el for profile build
Our cli.el ended up in the profile used at runtime. Although we could have fixed overwriting a user's cli.el by appending to it, that still would have leaked our build commands into the build. This approach should be equivalent and reduces our profile modifications to replacing packages.el (which is kind of the point) and prepending to init.el (unfortunate, but seemingly necessary).
This commit is contained in:
parent
e41bb2e0e5
commit
bc288fad83
4 changed files with 74 additions and 65 deletions
15
build-helpers/build-profile-loader
Executable file
15
build-helpers/build-profile-loader
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env doomscript
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(defcli! build-profile-loader
|
||||
((profile-name ("-n" form) "profile name.")
|
||||
(profile-directory ("-p" dir) "profile data directory.")
|
||||
(profile-doom-dir ("-d" dir) "doomdir"))
|
||||
"write doom's profile loader."
|
||||
(let ((new-profiles `((,profile-name
|
||||
(user-emacs-directory . ,doom-emacs-dir)
|
||||
(doom-profile-data-dir . ,profile-directory)
|
||||
("doomdir" . ,profile-doom-dir)))))
|
||||
(doom-profiles-save new-profiles)))
|
||||
|
||||
(run! "build-profile-loader" (cdr (member "--" argv)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue