Skip to content

Commit

Permalink
Add Makefile to update the repository
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Feb 26, 2018
1 parent 8462592 commit 3e0937c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
# Compiled
*.elc

# Packaging
.cask

# Backup files
*~

# Undo-tree save-files
*.~undo-tree
.DS_Store
build/*
!build/.spacemacs
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ----------------------------------------------------------------------------
# S P A C E L P A M A K E F I L E
# ----------------------------------------------------------------------------

MAKEFILE_PATH = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

BUILD_PATH = $(MAKEFILE_PATH)/build
EMACS_CONFIG_DIR = .emacs.d
EMACS_CONFIG_PATH = $(BUILD_PATH)/$(EMACS_CONFIG_DIR)
EMACS_SCRIPT_FILE = $(SCRIPT_DIR)/spacelpa.el
LOAD_FILES = core/core-versions.el core/core-load-paths.el
SCRIPT_DIR = scripts

.PHONY: clean
clean:
rm -rf $(EMACS_CONFIG_PATH)

$(EMACS_CONFIG_PATH):
git clone "[email protected]:syl20bnr/spacemacs" $(EMACS_CONFIG_PATH)
cd $(EMACS_CONFIG_PATH) && git checkout develop

.PHONY: update
update: $(EMACS_CONFIG_PATH)
HOME=$(BUILD_PATH) emacs -batch \
$(addprefix -l $(EMACS_CONFIG_PATH)/, $(LOAD_FILES)) \
-l $(MAKEFILE_PATH)/$(EMACS_SCRIPT_FILE)
7 changes: 7 additions & 0 deletions build/.spacemacs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(defun dotspacemacs/layers ()
(setq-default
dotspacemacs-distribution 'spacemacs-bootstrap))
(defun dotspacemacs/init ())
(defun dotspacemacs/user-init ())
(defun dotspacemacs/config ())
(defun dotspacemacs/user-config ())
23 changes: 23 additions & 0 deletions scripts/spacelpa.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
;;; spacelpa.el
;;
;; Copyright (c) 2018 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacelpa
;;
;; This file is not part of GNU Emacs.
;;
;; Creates/update the spacelpa ELPA repository.
;;
;;; License: GPLv3

(require 'core-spacemacs)

(configuration-layer/load-lock-file)
(spacemacs/init)
(configuration-layer/load)

(let ((dir (expand-file-name
(concat (file-name-directory load-file-name)
"../" ))))
(configuration-layer/create-elpa-repository "" dir))

0 comments on commit 3e0937c

Please sign in to comment.