[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Org update script

From: Pete Phillips
Subject: Re: [Orgmode] Org update script
Date: Wed, 25 Apr 2007 19:58:46 +0100

>>>>> "Scott" == Scott Jaderholm <address@hidden> 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.


# script to automate pulling the latest org from Carsten's site
# PJP address@hidden

# set up some variables
# edit these.!!!

# directory where the org directory is located
# the name of the sym link we will create
# duh!

# 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]