File: getrev.cmd

package info (click to toggle)
smplayer 20.6.0~ds0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 35,688 kB
  • sloc: cpp: 48,548; ansic: 16,655; makefile: 298; sh: 43
file content (20 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@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%"=="" (
  set SVN_REV=UNKNOWN
  echo Unknown SVN revision. SVN missing in PATH or not a working copy.
) else (
  echo SVN Revision: %SVN_REV%
)
echo.

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

set SVN_REV=