From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pete Phillips Subject: Re: Org update script Date: Wed, 25 Apr 2007 19:58:46 +0100 Message-ID: <30717.1177527526@lap1.smtl.co.uk> References: Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HgmnT-0008PH-4A for emacs-orgmode@gnu.org; Wed, 25 Apr 2007 15:04:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HgmnQ-0008L0-Ki for emacs-orgmode@gnu.org; Wed, 25 Apr 2007 15:04:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgmnQ-0008Kq-DF for emacs-orgmode@gnu.org; Wed, 25 Apr 2007 15:04:56 -0400 Received: from fw.smtl.co.uk ([193.131.77.174] helo=mailhost.smtl.co.uk) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hgmhl-00030c-Bx for emacs-orgmode@gnu.org; Wed, 25 Apr 2007 14:59:05 -0400 In-Reply-To: Message from "Scott Jaderholm" of "Wed, 25 Apr 2007 10:30:27 MDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Scott Jaderholm Cc: emacs-orgmode >>>>> "Scott" == Scott Jaderholm writes: Scott> Has anyone created a script for updating org? This will do the job. It doesn't compile the lisp file, but I frequently don't bother to do this anyway. :-) This also means that it keeps all old versions, and you can restore an old version by changing the symbolic link if you wish. Save the file as below the dashes as 'update-org.sh' or similar, edit the variables to make sense for your setup, make it executable: chmod +x ~/bin/update-org.sh and then run it. Let me know how it goes. regards Pete ------------------------------------------------------ #!/bin/sh # script to automate pulling the latest org from Carsten's site # PJP pete@smtl.co.uk # set up some variables # edit these.!!! # directory where the org directory is located DIR=$HOME/emacs/lisp # the name of the sym link we will create ORGDIR=$DIR/org # duh! TMP=/tmp TMPTAR=$TMP/org.tar.gz # go to the tmp dir cd $TMP # make sure we have the lisp dir mkdir -p $DIR # get the tar file wget http://staff.science.uva.nl/~dominik/Tools/org/org.tar.gz # ORGDIR is a symbolic link. We get rid of it rm -f $DIR # cd to the lisp directory cd $DIR # unpack the tar file tar xzvf $TMPTAR # what is the new directory name? # (yes I could use awk, but I can write this line faster than I could # check out the man page) ORGVER=`tar tvf $TMPTAR | head -1 | sed 's/ */ /g' | cut -d' ' -f6` # remake the link... ln -s $ORGVER org # and relax.... echo "$ORGVER is now installed. You can cd to $ORGDIR and run make if you wish. Don't forget to edit the Makefile. "