From 1626231f4d05fef8aa774e0ae2ef557402ac2c75 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 21 Apr 2011 23:18:57 -0400 Subject: [PATCH] Adapt Org fetcher to archive-contents.el. admin/org-synch.el (org-synch): Ignore archive-contents if it is missing. admin/org-synch.sh: Fix PATH. --- admin/org-synch.el | 21 ++++++++++----------- admin/org-synch.sh | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/admin/org-synch.el b/admin/org-synch.el index 2d9782a0c..cc7e92390 100644 --- a/admin/org-synch.el +++ b/admin/org-synch.el @@ -10,14 +10,13 @@ (error "Package date is bad")) (unless (file-exists-p package-file) (error "No package file found")) - (unless (file-exists-p archive-file) - (error "No archive file found")) - (find-file archive-file) - (setq contents (read (current-buffer)) - entry (assq package-name contents)) - (unless entry - (error "No entry for %s in archive-contents" package-name)) - (aset (cdr entry) 0 (version-to-list date)) - (erase-buffer) - (insert (pp-to-string contents) "\n") - (save-buffer 0))) + (when (file-exists-p archive-file) + (find-file archive-file) + (setq contents (read (current-buffer)) + entry (assq package-name contents)) + (unless entry + (error "No entry for %s in archive-contents" package-name)) + (aset (cdr entry) 0 (version-to-list date)) + (erase-buffer) + (insert (pp-to-string contents) "\n") + (save-buffer 0)))) diff --git a/admin/org-synch.sh b/admin/org-synch.sh index 79c551b66..6a13e8f1f 100755 --- a/admin/org-synch.sh +++ b/admin/org-synch.sh @@ -2,7 +2,7 @@ # this script expects $1 to be the download directory and $2 to have org-synch.el -PATH=/bin:/usr/bin:/usr/local/bin +PATH="/bin:/usr/bin:/usr/local/bin:${PATH}" pkgname=`curl -s http://orgmode.org/pkg/daily/|perl -ne 'push @f, $1 if m/(org-\d{8}\.tar)/; END { @f = sort @f; print "$f[-1]\n"}'` -- 2.39.2