emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pete Phillips <pete@smtl.co.uk>
To: Scott Jaderholm <jaderholm@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Org update script
Date: Wed, 25 Apr 2007 19:58:46 +0100	[thread overview]
Message-ID: <30717.1177527526@lap1.smtl.co.uk> (raw)
In-Reply-To: Message from "Scott Jaderholm" <jaderholm@gmail.com> of "Wed, 25 Apr 2007 10:30:27 MDT." <b2e202b30704250930g5cb82df9r5d8dbf4f33c64136@mail.gmail.com>


>>>>> "Scott" == Scott Jaderholm <jaderholm@gmail.com> 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.
"

  reply	other threads:[~2007-04-25 19:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25 16:30 Org update script Scott Jaderholm
2007-04-25 18:58 ` Pete Phillips [this message]
2007-04-25 19:57   ` Scott Jaderholm
2007-04-25 21:57     ` Pete Phillips
2007-04-25 22:27 ` Patrick Drechsler
2007-04-26  4:41   ` Carsten Dominik
2007-04-26  5:56     ` Pete Phillips
2007-04-28 22:22     ` Patrick Drechsler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30717.1177527526@lap1.smtl.co.uk \
    --to=pete@smtl.co.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=jaderholm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).