forked from coin-or/Sonnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-third-party-license.bat
73 lines (60 loc) · 1.87 KB
/
build-third-party-license.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@echo off
SETLOCAL EnableDelayedExpansion
pushd "%CD%"
cd /d "%~dp0"
echo Output to "%~dp0THIRD-PARTY-LICENSE.txt"
call :DoWork > THIRD-PARTY-LICENSE.txt
dir "%~dp0THIRD-PARTY-LICENSE.txt" | find "THIRD"
popd
ENDLOCAL
goto :eof
:DoWork
echo SONNET THIRD PARTY LICENSE FILE
echo.
echo.
echo Sonnet includes a number of subcomponents with separate copyright notices and
echo license terms. Sonnet does not necessarily use all the subcomponents referred
echo to below. Your use of these subcomponents is subject to the terms and
echo conditions of the following licenses.
echo.
echo.
set _componentName=COIN-OR BuildTools
set _componentLic=..\BuildTools\LICENSE
call :WriteLicense
set _componentName= COIN-OR Cbc
set _componentLic=..\Cbc\LICENSE
call :WriteLicense
set _componentName=COIN-OR Cgl
set _componentLic=..\Cgl\LICENSE
call :WriteLicense
set _componentName=COIN-OR Clp
set _componentLic=..\Clp\LICENSE
call :WriteLicense
set _componentName=COIN-OR Clp
set _componentLic=..\Clp\LICENSE
call :WriteLicense
set _componentName=COIN-OR Clp
set _componentLic=..\Clp\LICENSE
call :WriteLicense
set _componentName=pthread-win32 for Windows (if applicable)
set _componentLic=..\..\pthreads\docs\license.md
if exist !_componentLic! call :WriteLicense
goto :eof
:WriteLicense
REM Uses _componentName and _componentLic
echo *****************************************************************************
echo ********* !_componentName! license section
echo *****************************************************************************
echo.
if not exist "!_componentLic!" (
echo ERROR: !_componentLic! not found!
exit /b 1
)
type "!_componentLic!"
echo.
echo.
echo *****************************************************************************
echo ********* END OF !_componentName! license section
echo *****************************************************************************
echo.
goto :eof