3 PATH
=/bin
:/usr
/bin
:/usr
/local
/bin
11 TARBALL
=$PKGROOT/emacs-packages-latest.tgz
12 TARBALL_ROOT
="emacs-24.1-packages-`/bin/date +'%F'`"
14 REPO
=bzr
://bzr.savannah.gnu.org
/emacs
/elpa
15 REPO_PACKAGES
=$REPO/packages
16 REPO_ADMIN
=$REPO/admin
18 PACKAGE_TARBALLS
="auctex-11.86 company-0.5 muse-3.20"
21 echo "Syntax: $0 HOMEDIR [fetch-extras-boolean]"
23 elif [ -d $ROOT ]; then
24 echo "Installing into '$ROOT', log is '$LOG'"
25 echo "Installing into '$ROOT'" > $LOG
27 echo "Sorry but $ROOT is not a directory, aborting."
32 ## Create the world-facing copy
33 echo "[$TMPROOT -> $PKGROOT] Creating the world-facing package repository copy in $PKGROOT" >> $LOG
36 bzr
export $TMPROOT $REPO_PACKAGES
38 echo "[$TMPROOT -> $PKGROOT] Running the post-export fetchers in $ADMINROOT against $TMPROOT" >> $LOG
40 bzr
export $ADMINROOT $REPO_ADMIN
42 if [ -z $FETCHEXTRAS ]; then
43 echo "Skipping the post-export fetchers" >> $LOG
44 echo "(pass 1 as the second parameter to get them with $0 or just run them manually)" >> $LOG
46 # Copy the org daily package from orgmode.org
47 echo "[$TMPROOT -> $PKGROOT] Running the post-export org-mode fetcher as '$ADMINROOT/org-synch.sh $TMPROOT $ADMINROOT'" >> $LOG
48 $ADMINROOT/org-synch.sh
$TMPROOT $ADMINROOT >> $LOG 2>&1
51 echo "Creating tarballs from unpacked packages $PACKAGE_TARBALLS in $TMPROOT" >> $LOG
53 for pt
in $PACKAGE_TARBALLS; do
54 echo "Creating tarball of $pt: tar of $TMPROOT/$pt into $TMPROOT/$pt.tar" >> $LOG
56 echo "Removing $TMPROOT/$pt" >> $LOG
61 echo "[$TMPROOT -> $PKGROOT] Moving $TMPROOT to $PKGROOT" >> $LOG
62 mv $PKGROOT $PKGROOT-old
66 echo "Exporting packages into $TARBALL (root = $TARBALL_ROOT)" >> $LOG
67 bzr
export --format=tgz
--root=$TARBALL_ROOT $TARBALL $REPO_PACKAGES
69 chmod -R a
+rX
$PKGROOT
71 echo "Update complete at" `/bin/date` >> $LOG