Refactor bin/doctor
This commit is contained in:
parent
d949935628
commit
f2c2550549
1 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
":"; command -v emacs >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; }
|
":"; command -v emacs >/dev/null || { >&2 echo "Emacs isn't installed"; exit 1; } # -*-emacs-lisp-*-
|
||||||
":"; [[ $(emacs --version | head -n1) == *\ 2[0-2].[0-1].[0-9] ]] && { echo "You're running $(emacs --version | head -n1)"; echo "That version is too old to run the doctor. Check your PATH"; echo; exit 2; } || exec emacs --no-site-file --batch -l "$0" # -*-emacs-lisp-*-
|
":"; [[ $(emacs --version | head -n1) == *\ 2[0-2].[0-1].[0-9] ]] && { echo "You're running $(emacs --version | head -n1)"; echo "That version is too old to run the doctor. Check your PATH"; echo; exit 2; } || exec emacs --no-site-file --batch -l "$0"
|
||||||
|
|
||||||
;; Uses a couple simple heuristics to locate issues with your environment that
|
;; Uses a couple simple heuristics to locate issues with your environment that
|
||||||
;; could interfere with running or setting up DOOM Emacs.
|
;; could interfere with running or setting up DOOM Emacs.
|
||||||
|
@ -13,6 +13,8 @@
|
||||||
(expand-file-name "~/.emacs.d/"))
|
(expand-file-name "~/.emacs.d/"))
|
||||||
(error "Couldn't find ~/.emacs.d"))
|
(error "Couldn't find ~/.emacs.d"))
|
||||||
|
|
||||||
|
(require 'pp)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
(defvar doom-errors 0)
|
(defvar doom-errors 0)
|
||||||
(defmacro check! (cond &rest body)
|
(defmacro check! (cond &rest body)
|
||||||
|
@ -152,7 +154,7 @@
|
||||||
"updating from non-ELPA sources."
|
"updating from non-ELPA sources."
|
||||||
(when (eq system-type 'darwin)
|
(when (eq system-type 'darwin)
|
||||||
(concat "\nMacOS users can install gnu-tar via homebrew:\n"
|
(concat "\nMacOS users can install gnu-tar via homebrew:\n"
|
||||||
" brew install gnu-tar"))))
|
" brew install gnu-tar"))))
|
||||||
(check! t ; very unlikely
|
(check! t ; very unlikely
|
||||||
(error! "Important: Couldn't find tar")
|
(error! "Important: Couldn't find tar")
|
||||||
(explain!
|
(explain!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue