File: getrev.cmd

package info (click to toggle)
smplayer 25.6.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,376 kB
  • sloc: cpp: 52,858; ansic: 16,655; makefile: 247; sh: 123; xml: 67
file content (22 lines) | stat: -rw-r--r-- 573 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off

:: Some SVN clients can use localized messages (e.g. SlikSVN), force English
set LC_ALL=C
set SVN_REV=

for /f "tokens=2" %%i in ('svn info ^| find "Revision:"') do set SVN_REV=%%i

:: Set to UNKNOWN if no svn or working copy
if "%SVN_REV%"=="" (
    for /f %%i in ('git rev-list --count HEAD') do set SVN_REV=%%i
)
if "%SVN_REV%"=="" (
  set SVN_REV=UNKNOWN
  echo Unknown SVN revision. SVN missing in PATH or not a working copy.
)
echo SVN Revision: %SVN_REV%
echo.

echo #define SVN_REVISION "%SVN_REV%">src\svn_revision.h

set SVN_REV=