]> code.delx.au - gnu-emacs-elpa/commitdiff
Adapt Org fetcher to archive-contents.el.
authorChong Yidong <cyd@stupidchicken.com>
Fri, 22 Apr 2011 03:18:57 +0000 (23:18 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 22 Apr 2011 03:18:57 +0000 (23:18 -0400)
admin/org-synch.el (org-synch): Ignore archive-contents if it is missing.
admin/org-synch.sh: Fix PATH.

admin/org-synch.el
admin/org-synch.sh

index 2d9782a0c8bab4483dadcf7936e5f7868ce5e89b..cc7e92390b053a7fd36b1df90778e7565b9f1d01 100644 (file)
       (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))))
index 79c551b66c1b5176fe867ba8a788c7e854ebdfb7..6a13e8f1f9846a60b4f721803a4518c7863b4949 100755 (executable)
@@ -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"}'`