bin/doom: add -l/--local/DOOMLOCALDIR
Will come in handy for the new testing framework.
This commit is contained in:
parent
ebdc9d610b
commit
a7ce48c2df
2 changed files with 8 additions and 1 deletions
5
bin/doom
5
bin/doom
|
@ -35,6 +35,7 @@
|
||||||
" -d --debug\t\tTurns on doom-debug-mode (and debug-on-error)\n"
|
" -d --debug\t\tTurns on doom-debug-mode (and debug-on-error)\n"
|
||||||
" -e --emacsd DIR\tUse the emacs config at DIR (e.g. ~/.emacs.d)\n"
|
" -e --emacsd DIR\tUse the emacs config at DIR (e.g. ~/.emacs.d)\n"
|
||||||
" -i --insecure\t\tDisable TLS/SSL validation (not recommended)\n"
|
" -i --insecure\t\tDisable TLS/SSL validation (not recommended)\n"
|
||||||
|
" -l --local DIR\tUse DIR as your local storage directory\n"
|
||||||
" -p --private DIR\tUse the private module at DIR (e.g. ~/.doom.d)\n"
|
" -p --private DIR\tUse the private module at DIR (e.g. ~/.doom.d)\n"
|
||||||
" -y --yes\t\tAuto-accept all confirmation prompts\n\n")
|
" -y --yes\t\tAuto-accept all confirmation prompts\n\n")
|
||||||
(princ (buffer-string)))
|
(princ (buffer-string)))
|
||||||
|
@ -62,6 +63,10 @@
|
||||||
(or (file-directory-p doom-private-dir)
|
(or (file-directory-p doom-private-dir)
|
||||||
(message "Warning: %s does not exist"
|
(message "Warning: %s does not exist"
|
||||||
(abbreviate-file-name doom-private-dir))))
|
(abbreviate-file-name doom-private-dir))))
|
||||||
|
((or "-l" "--local")
|
||||||
|
(setq doom-local-dir (expand-file-name (concat (pop args) "/")))
|
||||||
|
(setenv "DOOMLOCALDIR" doom-local-dir)
|
||||||
|
(message "DOOMLOCALDIR changed to %s" doom-local-dir))
|
||||||
((or "-e" "--emacsd")
|
((or "-e" "--emacsd")
|
||||||
(setq emacs-dir (expand-file-name (concat (pop args) "/")))
|
(setq emacs-dir (expand-file-name (concat (pop args) "/")))
|
||||||
(message "Emacs directory changed to %s" emacs-dir))
|
(message "Emacs directory changed to %s" emacs-dir))
|
||||||
|
|
|
@ -38,7 +38,9 @@ decrease this. If you experience stuttering, increase this.")
|
||||||
(defvar doom-modules-dir (concat doom-emacs-dir "modules/")
|
(defvar doom-modules-dir (concat doom-emacs-dir "modules/")
|
||||||
"The root directory for Doom's modules. Must end with a slash.")
|
"The root directory for Doom's modules. Must end with a slash.")
|
||||||
|
|
||||||
(defvar doom-local-dir (concat doom-emacs-dir ".local/")
|
(defvar doom-local-dir
|
||||||
|
(or (getenv "DOOMLOCALDIR")
|
||||||
|
(concat doom-emacs-dir ".local/"))
|
||||||
"Root directory for local storage.
|
"Root directory for local storage.
|
||||||
|
|
||||||
Use this as a storage location for this system's installation of Doom Emacs.
|
Use this as a storage location for this system's installation of Doom Emacs.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue