Merge commit 'f06dce2c1f0f3af78581e7574f65bfba843ddb6e' into merges
[unleashed.git] / contrib / libpcap / GenVersion.bat
blobbabf3737efa5503f8cc6aa141c2f050e0a0168c0
1 REM
2 REM Automatically generate pcap_version.h based on pcap_version.h.in
3 REM for Windows
4 REM The version string comes from VERSION
5 REM @echo off
6 REM
8 setlocal enableextensions disabledelayedexpansion
10 set "search=%%%%LIBPCAP_VERSION%%%%"
11 set /p replace=<%1
13 if exist %3 del %3 2>nul
15 for /f "delims=" %%i in ('type %2' ) do (
16         set "line=%%i"
17         setlocal enabledelayedexpansion
18         set "line=!line:%search%=%replace%!"
19         >>%3 echo(!line!
20         endlocal
23 echo pcap_version.h generated