summaryrefslogtreecommitdiff
path: root/GenVersion.bat
blob: babf3737efa5503f8cc6aa141c2f050e0a0168c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
REM
REM Automatically generate pcap_version.h based on pcap_version.h.in
REM for Windows
REM The version string comes from VERSION
REM @echo off
REM

setlocal enableextensions disabledelayedexpansion

set "search=%%%%LIBPCAP_VERSION%%%%"
set /p replace=<%1

if exist %3 del %3 2>nul

for /f "delims=" %%i in ('type %2' ) do (
	set "line=%%i"
	setlocal enabledelayedexpansion
	set "line=!line:%search%=%replace%!"
	>>%3 echo(!line!
	endlocal
)

echo pcap_version.h generated