-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathportacle-package.el
More file actions
28 lines (22 loc) · 875 Bytes
/
portacle-package.el
File metadata and controls
28 lines (22 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(provide 'portacle-package)
(require 'package)
(setq package-gnupghome-dir nil)
;(setq package-check-signature nil)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(defvar *package-lists-fetched* nil)
(defun soft-fetch-package-lists ()
(unless *package-lists-fetched*
(package-refresh-contents)
(setf *package-lists-fetched* t)))
;; package-installed-p will always report NIL if a newer
;; version is available. We do not want that.
(defun package-locally-installed-p (package)
(assq package package-alist))
(defun ensure-installed (&rest packages)
(unless (cl-loop for package in packages
always (package-locally-installed-p package))
(soft-fetch-package-lists)
(dolist (package packages)
(unless (package-locally-installed-p package)
(package-install package)))))