]> code.delx.au - gnu-emacs-elpa/blob - admin/org-synch.sh
* admin/org-synch.sh, admin/package-update.sh: Rewrite for
[gnu-emacs-elpa] / admin / org-synch.sh
1 #!/bin/sh
2
3 # this script expects $1 to be the download directory and $2 to have org-synch.el
4
5 pkgname=`/usr/bin/curl -s http://orgmode.org/pkg/daily/|/usr/bin/perl -ne 'push @f, $1 if m/(org-\d{8}\.tar)/; END { @f = sort @f; print "$f[-1]\n"}'`
6
7 cd $1
8 /usr/bin/wget -q http://orgmode.org/pkg/daily/$pkgname -O ${pkgname}-tmp
9 if [ -f ${pkgname}-tmp ]; then
10 /bin/rm -f org*.tar
11 /bin/mv ${pkgname}-tmp $pkgname && \
12 /usr/bin/emacs -batch -l $2/org-synch.el -f org-synch
13 fi