BugFix: we have two list now, so checking the links for NULL is not enough ...
[libfirm] / win32 / install.cmd
1 @echo off
2 rem
3 rem Simple Header install script for libfirm and friens, uses NT command shell
4 rem syntax
5 rem
6 rem (C) 2005 Universitaet Karlsruhe
7 rem
8 rem Michael Beck   beck@ipd.info.uni-karlsruhe.de
9 rem
10 rem 
11
12 set SRC=%1
13 set DST=%2
14
15 if "%1" == "" goto usage
16 if "%2" == "" goto usage
17
18 echo Installing Header files to %DST% ...
19
20 if not exist %DST% mkdir %DST%
21 for /F "eol=# tokens=1,2" %%i in (header.list) do if not exist "%DST%\%%j" mkdir %DST%\%%j
22 for /F "eol=# tokens=1,2" %%i in (header.list) do echo   %%i && copy /Y %SRC%\%%i %DST%\%%j >NUL
23 echo done.
24
25 goto end
26
27 :usage
28 echo Usage: %0 SRC-DIR DST-DIR
29 :end