bug-apl
[Top][All Lists]
Advanced

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

RE: How find GNUAPL svn repository revision number


From: Callahan, Brian Robert
Subject: RE: How find GNUAPL svn repository revision number
Date: Tue, 22 Sep 2020 19:48:03 +0000

In your script, you could use wget or curl or lynx to download that web page, then pipe it into some creative use of grep/sed/awk/perl to extract just the title, then another pipe to another round of grep/sed/awk/perl to get just the revision number.

Untested, but something like this should be close to working:
lynx -dump http://svn.savannah.gnu.org/svn/apl/trunk/ | sed '2q;d' | awk '{ print $3 }'

You might have to play around with the sed or the awk column or something, but this should be a good first step.

~Brian


Brian Robert Callahan, Ph.D.
Lecturer, ITWS@RPI
Office: Amos Eaton 132

From: Peter Teeson [peter.teeson@me.com]
Sent: Tuesday, September 22, 2020 3:33 PM
To: Callahan, Brian Robert
Cc: bug-apl@gnu.org
Subject: Re: How find GNUAPL svn repository revision number

Thanks for your reply but I don’t understand what you mean by ‘scrape that’


On Sep 22, 2020, at 2:21 PM, Callahan, Brian Robert <callab5@rpi.edu> wrote:

http://svn.savannah.gnu.org/svn/apl/trunk/
Will be in the page title. I'd say scrape that since it's easy to do so.

~Brian


Brian Robert Callahan, Ph.D.
Lecturer, ITWS@RPI
Office: Amos Eaton 132

From: Bug-apl [bug-apl-bounces+callab5=rpi.edu@gnu.org] on behalf of Peter Teeson [peter.teeson@me.com]
Sent: Tuesday, September 22, 2020 2:17 PM
To: bug-apl@gnu.org
Subject: How find GNUAPL svn repository revision number

I’ve searched and read for the answer but come up dry.

I’m on macOS High Sierra
Assume I have svn co'd …trunk to a local working copy

I want to write a bash script to 
    compare the local working copy revision number 
vs 
   the svn://svn.savannah.gnu.org/apl/trun repository revision number.

I know how to find out the revision number of my local working copy
using svnversion or svn info if i need more data.

My question: 

But I don’t know how to script to get the revision number 

Please help….

Thanks

Peter


reply via email to

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