dolibarr-doxygen-getversion.pl 604 B

123456789101112131415161718192021
  1. #!/usr/bin/perl
  2. #--------------------------------------------------------------------
  3. # Script to get version of a source file
  4. # Does not work with cygwin cvs command on Windows.
  5. #
  6. #--------------------------------------------------------------------
  7. # Usage: dolibarr-doxygen-getversion.pl pathtofilefromdolibarrroot
  8. $file=$ARGV[0];
  9. if (! $file)
  10. {
  11. print "Usage: dolibarr-doxygen-getversion.pl pathtofilefromdolibarrroot\n";
  12. exit;
  13. }
  14. $commande='cvs status "'.$file.'" | sed -n \'s/^[ \]*Working revision:[ \t]*\([0-9][0-9\.]*\).*/\1/p\'';
  15. #print $commande;
  16. $result=`$commande 2>&1`;
  17. print $result;