[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6d0ed0e 03/11: Cleanup dependency management.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 6d0ed0e 03/11: Cleanup dependency management. |
Date: |
Sat, 14 Mar 2015 20:21:41 +0000 |
branch: master
commit 6d0ed0ecadb7aeab3ff0bf74aeb411b2aa10d60a
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Cleanup dependency management.
---
Makefile | 3 +-
scripts/dependencies | 2 +
scripts/download-dependencies.el | 41 ++++++++++++++++++++++---------------
3 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index c265382..3a6a0be 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,8 @@ clean: uncompile
${DEPENDENCIES}:
${EMACS} -Q -batch \
- -l scripts/download-dependencies.el
+ -l scripts/download-dependencies.el \
+ -f download-dependencies
test: ${DEPENDENCIES}
${EMACS} -Q -batch \
diff --git a/scripts/dependencies b/scripts/dependencies
new file mode 100644
index 0000000..c2a9107
--- /dev/null
+++ b/scripts/dependencies
@@ -0,0 +1,2 @@
+https://raw.githubusercontent.com/mooz/js2-mode/master/js2-mode.el
+https://raw.githubusercontent.com/rejeep/ert-async.el/master/ert-async.el
diff --git a/scripts/download-dependencies.el b/scripts/download-dependencies.el
index b4a82fc..2ab24e2 100644
--- a/scripts/download-dependencies.el
+++ b/scripts/download-dependencies.el
@@ -17,8 +17,10 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-;; This script downloads some dependencies for development so they don't need
to
-;; be version-controlled.
+;; Download dependencies for development.
+
+;; Dependencies don't need to be version-controlled. They are also
+;; bleeding-edge, which is good because that is what most MELPA users are
using.
;;; Code:
@@ -35,20 +37,25 @@
`url-retrieve-synchronously'."
(goto-char 1)
(kill-paragraph 1) ; The headers are 1 paragraph. I hope.
- (kill-line) ; A line separates the headers from the file's content.
- )
-
-;; Download any missing dependencies.
-(let ((files
'("https://raw.githubusercontent.com/mooz/js2-mode/master/js2-mode.el"
-
"https://raw.githubusercontent.com/rejeep/ert-async.el/master/ert-async.el")))
- (make-directory (download-dependencies-resolve-path "../libraries") t)
- (dolist (file files)
- (let* ((basename (file-name-nondirectory file))
- (destination (download-dependencies-resolve-path
- (concat "../libraries/" basename))))
- (when (null (file-exists-p destination))
- (with-current-buffer (url-retrieve-synchronously file)
- (download-dependencies-strip-headers)
- (write-file destination))))))
+ (kill-line)) ; A line separates the headers from the file's content.
+
+(defun download-dependencies-get-dependencies ()
+ "Read the `dependencies' file as a list of URLs."
+ (with-temp-buffer
+ (insert-file-contents (download-dependencies-resolve-path
"./dependencies"))
+ (split-string (buffer-substring-no-properties (point-min) (point-max)))))
+
+(defun download-dependencies ()
+ "Download dependencies for development."
+ (let ((files (download-dependencies-get-dependencies)))
+ (make-directory (download-dependencies-resolve-path "../libraries") t)
+ (dolist (file files)
+ (let* ((basename (file-name-nondirectory file))
+ (destination (download-dependencies-resolve-path
+ (concat "../libraries/" basename))))
+ (unless (file-exists-p destination)
+ (with-current-buffer (url-retrieve-synchronously file)
+ (download-dependencies-strip-headers)
+ (write-file destination)))))))
;;; download-dependencies.el ends here
- [elpa] master updated (b36c4b4 -> 1d1af16), Jackson Ray Hamilton, 2015/03/14
- [elpa] master 5dff74a 01/11: Cleanup., Jackson Ray Hamilton, 2015/03/14
- [elpa] master 6d0ed0e 03/11: Cleanup dependency management.,
Jackson Ray Hamilton <=
- [elpa] master 32f67a7 02/11: Cleanup., Jackson Ray Hamilton, 2015/03/14
- [elpa] master ba015ce 04/11: Add option to only colorize comments specially., Jackson Ray Hamilton, 2015/03/14
- [elpa] master 5ef598f 05/11: Refactor tests for setups and reused fixtures., Jackson Ray Hamilton, 2015/03/14
- [elpa] master 7e208ed 08/11: Use the better zenburn red., Jackson Ray Hamilton, 2015/03/14
- [elpa] master bde8c44 06/11: Add syntactic strings option., Jackson Ray Hamilton, 2015/03/14
- [elpa] master b83709f 07/11: Deprecate `comments-and-strings'., Jackson Ray Hamilton, 2015/03/14
- [elpa] master f062d5a 10/11: Version 6.1.0., Jackson Ray Hamilton, 2015/03/14
- [elpa] master 4849fd4 09/11: Update options documentation., Jackson Ray Hamilton, 2015/03/14
- [elpa] master 1d1af16 11/11: Merge commit 'f062d5a55496e22cf89f2ef9778a24a840a5a68e' from context-coloring, Jackson Ray Hamilton, 2015/03/14