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