|
| 1 | +;;; windows-bootstrap.el --- Windows test bootstrap -*- lexical-binding: t; -*- |
| 2 | +;; |
| 3 | +;; Copyright (C) 2020 emacs-lsp maintainers |
| 4 | +;; |
| 5 | +;; This program is free software; you can redistribute it and/or modify |
| 6 | +;; it under the terms of the GNU General Public License as published by |
| 7 | +;; the Free Software Foundation, either version 3 of the License, or |
| 8 | +;; (at your option) any later version. |
| 9 | + |
| 10 | +;; This program is distributed in the hope that it will be useful, |
| 11 | +;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +;; GNU General Public License for more details. |
| 14 | + |
| 15 | +;; You should have received a copy of the GNU General Public License |
| 16 | +;; along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 17 | +;; |
| 18 | +;;; Commentary: |
| 19 | +;; |
| 20 | +;; Windows test bootstrap |
| 21 | +;; |
| 22 | +;;; Code: |
| 23 | + |
| 24 | +(require 'package) |
| 25 | + |
| 26 | + |
| 27 | +(setq user-emacs-directory (expand-file-name (make-temp-name ".emacs.d") |
| 28 | + "~") |
| 29 | + package-user-dir (expand-file-name (make-temp-name "tmp-elpa") |
| 30 | + user-emacs-directory)) |
| 31 | + |
| 32 | +(let* ((package-archives '(("melpa" . "https://melpa.org/packages/") |
| 33 | + ("gnu" . "https://elpa.gnu.org/packages/"))) |
| 34 | + (pkgs '(dash dash-functional f lv ht spinner markdown-mode deferred))) |
| 35 | + (package-initialize) |
| 36 | + (package-refresh-contents) |
| 37 | + |
| 38 | + (mapc (lambda (pkg) |
| 39 | + (unless (package-installed-p pkg) |
| 40 | + (package-install pkg))) |
| 41 | + pkgs) |
| 42 | + |
| 43 | + (add-hook 'kill-emacs-hook |
| 44 | + `(lambda () (delete-directory ,user-emacs-directory t)))) |
| 45 | + |
| 46 | +;;; windows-bootstrap.el ends here |
0 commit comments