The problem is that the completed SVN Id keyword contains @ and $ symbols.
So my code resorts to greping it's self to get the value from the source code.
# $Id$
my $id_str = `grep -m1 '\$Id:' $0`;
print $id_str;
It feels like a crime against programming, but it works - and provided that there is an $Id$ before the grep command, it should work reliabably.
No comments:
Post a Comment