Emacs: Make my/straight-check-last-update work.
The build-cache is modified on each start.
This commit is contained in:
parent
48c515dc2b
commit
b34f41c6bd
|
@ -1,6 +1,6 @@
|
|||
;;; package-management.el --- Initialize package management -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-03-18T13:06:33+0100>
|
||||
;; Time-stamp: <2020-03-18T13:56:25+0100>
|
||||
|
||||
;;; Commentary:
|
||||
;; * Set up straight
|
||||
|
@ -45,14 +45,12 @@
|
|||
(straight-use-package 'use-package)
|
||||
|
||||
(defun my/straight-check-last-update ()
|
||||
"Notify if 7 days have passed since the build cache was modified."
|
||||
(unless straight-cache-autoloads
|
||||
(error "`straight-cache-autoloads' needs to be t"))
|
||||
"Notify if 7 days have passed since the MELPA repo was last updated."
|
||||
(let ((days 7))
|
||||
(when (> (- (time-to-seconds)
|
||||
(time-to-seconds
|
||||
(file-attribute-modification-time
|
||||
(file-attributes (expand-file-name "straight/build-cache.el"
|
||||
(file-attributes (expand-file-name "straight/repos/melpa"
|
||||
user-emacs-directory)))))
|
||||
(* 60 60 24 days))
|
||||
(message "The last update was more than %d days ago." days))))
|
||||
|
|
Loading…
Reference in New Issue