(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))))
# 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"}'`