feat: make bin/doom profile aware

- Fixes Doom's former inability to (trivially) juggle multiple profiles
  based on the same EMACSDIR (see #6593).
- Adds '--profile NAME' switch to bin/doom (also recognized
  $DOOMPROFILE).
- Adds new doom-profile* variables. These will eventually replace
  doom-{local,etc,cache}-dir and doom-{autoloads,env}-file.

This is intentionally messy to ensure backwards compatibility for a
little while longer. This will be fixed over the next couple weeks.

Ref: #6593
This commit is contained in:
Henrik Lissner 2022-07-27 22:25:08 +02:00
parent 1ecb5c7b9b
commit 5af38fb08e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
5 changed files with 154 additions and 67 deletions

View file

@ -49,7 +49,10 @@ OPTIONS:
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(when jobs
(setq native-comp-async-jobs-number (truncate jobs)))
(print! (start "Synchronizing your config with Doom Emacs..."))
(print! (start "Synchronizing %S profile..." )
(if doom-profile
(car (split-string doom-profile "@"))
"default"))
(unwind-protect
(print-group!
(when (and (not noenvvar?)