source: CMT/v1r18p20041201/mgr/cmt_installdir_action.bat @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 982 bytes
Line 
1
2
3@echo off
4
5rem
6rem 1  absolute source directory
7rem 2  file name (a directory)
8rem 3  absolute installation directory
9rem 4  exclusion file
10rem
11
12set source_dir=%1%
13set dir_name=%2%
14set install_dir=%3%
15set exclusion_file=%4%
16
17set dest_file_path=%install_dir%\%dir_name%
18set ref_file=%dest_file_path%.cmtref
19set full_source_name=%source_dir%\%dir_name%
20
21if "%source_dir%"=="" exit /B 0
22if "%dir_name%"=="" exit /B 0
23if "%install_dir%"=="" exit /B 0
24
25if NOT exist "%full_source_name%" exit /B 0
26
27if NOT exist %install_dir% mkdir %install_dir%
28
29if NOT exist %install_dir% echo "Cannot install directory %dir_name%, no installation directory specified" & exit /B 0
30
31echo Installing directory %dir_name% into %install_dir%
32
33if exist %dest_file_path% rmdir /S/Q %dest_file_path%
34
35if exist %ref_file% del %ref_file%
36
37mkdir %dest_file_path% 
38xcopy /S/Y/Q/EXCLUDE:%exclude_file% %full_source_name% %dest_file_path%
39echo %full_source_name% >%ref_file%
Note: See TracBrowser for help on using the repository browser.