1 ;; sy-pui-update.el --- Update packages from cron.
4 ;; This is hardly worth putting a copyright notice on, so you can
5 ;; do whatever you like with this. :-)
7 ;; Set the download mirror and directory to your liking. It's hard
8 ;; coded because we don't want to waste our time loading up any
9 ;; customisations. Put it in you load-path and then add something
10 ;; like this to your crontab:
12 ;; 15 3 * * sun xemacs -batch -vanilla -l pui-update -f pui-update-all
14 ;; Then every Sunday at 3:15am your installed packages will be
19 (require 'package-get)
22 (defvar pui-update-mirror '("ftp.au.xemacs.org" "pub/xemacs/beta/experimental/packages")
25 (defun pui-update-fetch-index ()
26 (let ((remote (concat "ftp://"
27 (nth 0 pui-update-mirror)
29 (nth 1 pui-update-mirror)
30 "/package-index.LATEST.gpg"))
31 (local (expand-file-name "package-index.LATEST.gpg"
32 user-init-directory)))
33 (curl:download remote local)))
35 (defun pui-update-all ()
37 (let ((package-get-remote pui-update-mirror)
38 (efs-use-passive-mode t))
40 (package-get-update-all)))
42 ; (pui-update-fetch-index)
44 ; (mapcar (lambda (pkg)
45 ; (if (not (package-get (car pkg) nil 'never))
46 ; (throw 'exit nil))) ;; Bail out if error detected
47 ; packages-package-list))))
50 ;;; sy-pui-update.el ends here