Manage crafted-emacs repository
This commit is contained in:
parent
9f28591ee2
commit
f4dc5002d9
1 changed files with 19 additions and 3 deletions
|
@ -47,6 +47,19 @@
|
||||||
;; Wait for elpaca
|
;; Wait for elpaca
|
||||||
(elpaca-wait)
|
(elpaca-wait)
|
||||||
|
|
||||||
|
(setq crafted-emacs-home "~/.local/share/crafted-emacs")
|
||||||
|
|
||||||
|
(defun check-crafted-emacs-fresh-repo ()
|
||||||
|
"Check if the crafted-emacs repo is fresh."
|
||||||
|
(if (file-exists-p crafted-emacs-home)
|
||||||
|
(progn
|
||||||
|
(message "Crafted Emacs repo exists. Pulling...")
|
||||||
|
(shell-command (format "cd %s && git pull" crafted-emacs-home)))
|
||||||
|
(progn
|
||||||
|
(message "Crafted Emacs repo does not exist. Cloning...")
|
||||||
|
(shell-command (format "git clone https://github.com/SystemCrafters/crafted-emacs.git %s" crafted-emacs-home)))
|
||||||
|
))
|
||||||
|
|
||||||
;; tangling to generate scripts for the local bin directory. This
|
;; tangling to generate scripts for the local bin directory. This
|
||||||
;; causes the name of the scripts to be returned in the car of the
|
;; causes the name of the scripts to be returned in the car of the
|
||||||
;; tangle command which is used to load the file. The net result is
|
;; tangle command which is used to load the file. The net result is
|
||||||
|
@ -58,8 +71,12 @@
|
||||||
(if (file-newer-than-file-p src tgt)
|
(if (file-newer-than-file-p src tgt)
|
||||||
(progn
|
(progn
|
||||||
(message "snamellit.org has been changed, tangling...")
|
(message "snamellit.org has been changed, tangling...")
|
||||||
(org-babel-tangle-file src tgt "emacs-lisp"))))
|
(org-babel-tangle-file src tgt "emacs-lisp")
|
||||||
|
;; this is a good time to check if the crafted-emacs repo is fresh
|
||||||
|
;; - we just updated the init.org file so we expect changes.
|
||||||
|
;; - or this is the initial tangling and we need the repo to exist.
|
||||||
|
(check-crafted-emacs-fresh-repo)
|
||||||
|
)))
|
||||||
|
|
||||||
;; Configure Crafted Emacs
|
;; Configure Crafted Emacs
|
||||||
(setq crafted-package-system 'elpaca)
|
(setq crafted-package-system 'elpaca)
|
||||||
|
@ -68,7 +85,6 @@
|
||||||
|
|
||||||
|
|
||||||
;; Startup Crafted Emacs
|
;; Startup Crafted Emacs
|
||||||
(setq crafted-emacs-home "~/.local/share/crafted-emacs")
|
|
||||||
(load (expand-file-name "modules/crafted-package-config" crafted-emacs-home))
|
(load (expand-file-name "modules/crafted-package-config" crafted-emacs-home))
|
||||||
(load (expand-file-name "modules/crafted-early-init-config" crafted-emacs-home))
|
(load (expand-file-name "modules/crafted-early-init-config" crafted-emacs-home))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue