]>
Commit | Line | Data |
---|---|---|
a7451d11 | 1 | @REM |
2 | @REM Copyright (c) 2008, Intel Corporation | |
3 | @REM All rights reserved. This program and the accompanying materials | |
4 | @REM are licensed and made available under the terms and conditions of the BSD License | |
5 | @REM which accompanies this distribution. The full text of the license may be found at | |
6 | @REM http://opensource.org/licenses/bsd-license.php | |
7 | @REM | |
8 | @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
9 | @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
10 | @REM | |
11 | ||
12 | @echo off | |
13 | @if /I "%1"=="-h" goto Usage | |
14 | @if /I "%1"=="-help" goto Usage | |
15 | @if /I "%1"=="--help" goto Usage | |
16 | @if /I "%1"=="/h" goto Usage | |
17 | @if /I "%1"=="/help" goto Usage | |
18 | @if /I "%1"=="/?" goto Usage | |
19 | ||
20 | set IMPORT_TOOL=%~dp0Trim.exe | |
21 | if NOT exist %IMPORT_TOOL% ( | |
22 | echo. | |
23 | echo !!! Trim.exe was not found. Please make sure that it is in the same directory as this script! | |
24 | echo. | |
25 | goto End | |
26 | ) | |
27 | ||
28 | if '%*'=='' ( | |
29 | set FILE_LIST=*.c | |
30 | ) else ( | |
31 | set FILE_LIST=%* | |
32 | ) | |
33 | ||
34 | for /r %%i in (%FILE_LIST%) do ( | |
35 | echo Converting ... %%i | |
36 | %IMPORT_TOOL% -8 -o %%i %%i | |
37 | ) | |
38 | goto End | |
39 | ||
40 | :Usage | |
41 | echo. | |
42 | echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [files]" | |
43 | echo. | |
44 | echo files File list or file pattern with wildcard, like "*.c *.h", | |
45 | echo seperated by space. If not specified, defaul to *.c. | |
46 | echo. | |
47 | ||
48 | :End | |
49 | set FILE_LIST= | |
50 | set IMPORT_TOOL= | |
51 | ||
52 | @echo on | |
53 |