comparison lisp/package-info.el @ 241:f955c73f5258 r20-5b19

Import from CVS: tag r20-5b19
author cvs
date Mon, 13 Aug 2007 10:16:16 +0200
parents 89ec2bb86eea
children 51092a27c943
comparison
equal deleted inserted replaced
240:835e739f3c17 241:f955c73f5258
68 version -- Package version number 68 version -- Package version number
69 filename -- Filename of tarball to generate info for." 69 filename -- Filename of tarball to generate info for."
70 (unless noninteractive 70 (unless noninteractive
71 (error "`batch-update-package-info' is to be used only with -batch")) 71 (error "`batch-update-package-info' is to be used only with -batch"))
72 (let ((version (nth 0 command-line-args-left)) 72 (let ((version (nth 0 command-line-args-left))
73 (filename (nth 1 command-line-args-left))) 73 (filename (nth 1 command-line-args-left))
74 (requires (nth 2 command-line-args-left)))
75 (unless requires
76 (setq requires ""))
74 (find-file package-info) 77 (find-file package-info)
75 (erase-buffer) 78 (erase-buffer)
76 (insert-file-contents-literally package-info-template) 79 (insert-file-contents-literally package-info-template)
77 (goto-char (point-min)) 80 (goto-char (point-min))
78 (pi-update-key "VERSION" (format "\"%s\"" version)) 81 (pi-update-key "VERSION" (format "\"%s\"" version))
80 (pi-md5sum filename))) 83 (pi-md5sum filename)))
81 (pi-update-key "FILENAME" (format "\"%s\"" 84 (pi-update-key "FILENAME" (format "\"%s\""
82 (file-name-nondirectory filename))) 85 (file-name-nondirectory filename)))
83 (pi-update-key "SIZE" (format "%d" 86 (pi-update-key "SIZE" (format "%d"
84 (nth 7 (file-attributes filename)))) 87 (nth 7 (file-attributes filename))))
88 (pi-update-key "REQUIRES" requires)
85 (save-buffers-kill-emacs 0))) 89 (save-buffers-kill-emacs 0)))
86 90
87 (provide 'package-info) 91 (provide 'package-info)
88 92
89 ;;; package-info.el ends here 93 ;;; package-info.el ends here