[Lazarus] handy svn update script

Henry Vermaak henry.vermaak at gmail.com
Mon Jul 28 15:27:38 CEST 2008


2008/7/28 Graeme Geldenhuys <graemeg.lists at gmail.com>:
> Hi,
>
> Below is a svn update script for *nix based systems.  I often want to
> check the logs after I did a update, to see what changed. I then sit
> with the problem, that I can't remember the revision I upgraded from.
> This doesn't just relate to Lazarus subversion, but to many other
> projects as well.  Anyway, this little script will report the before
> and after revision once the update is complete..  I thought someone
> might find this handy.
>
> --------------------[   svnup.sh   ]----------------------------
> #!/bin/bash
>
> oldrev=$(svn info |grep '^Revision: '|sed 's/Revision: //g')
>
> svn up
>
> newrev=$(svn info |grep '^Revision: '|sed 's/Revision: //g')
>
> [ "$oldrev" == "$newrev" ] || {
>        echo " "
>        echo "Made the step from $oldrev to $newrev "
> }
> --------------------[   end   ]----------------------------
>
>

you can drop the grep and use:

svn info | sed -n 's/^Revision: //p'

;)



More information about the Lazarus mailing list