source: pacpusframework/branches/0.0.x/scripts/update-license.bat@ 308

Last change on this file since 308 was 74, checked in by Marek Kurdej, 12 years ago

Added: scripts for automated license updating.
The license should be between lines with %pacpus:license{ and %pacpus:license}.
See Pacpus/kernel/Log.h for an example.

File size: 606 bytes
Line 
1@echo off
2
3:: You have to install `sed` first!
4
5:init
6:: get full path of the file
7set FILE=%~df1
8set SCRIPTS_DIR=%2
9set MV=move
10
11::echo %FILE%
12::echo %LICENSE_HEADER_FILE%
13
14:find
15:: remove license
16:: sed '/^%pacpus:license{/,/^%pacpuse:license}/d' %FILE%
17
18sed -nf %SCRIPTS_DIR%\update-license.sed "%FILE%" > update-license.tmp
19%MV% update-license.tmp "%FILE%"
20
21:: print lines from begin of file till begin of license
22::sed -n '0,/^%pacpus:license{/ p' %FILE%
23:: print new license
24
25:: print lines from end of license till end of file
26::sed -n '/^%pacpus:license}/,$ p' %FILE%
Note: See TracBrowser for help on using the repository browser.