Changeset 1885
- Timestamp:
- Oct 20, 2015, 5:36:39 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/warpin/bld_fm2_wpidirs.cmd
r1246 r1885 5 5 * FM/2 Warpin archive (WPI file). 6 6 * 7 * Change log: 8 * 19 Oct 15 JBS Ticket #574: Support multiple levels of destination directories 9 * 7 10 * TODO: 8 * - Support multiple levels of destination directories9 11 * - Add logic to read script to determine 10 12 * - Number of packages … … 40 42 41 43 do f = 1 to WPI.fileline.0 42 parse var WPI.fileline.f . filename pkgnum src_subdir dest_subdir 44 parse var WPI.fileline.f . filename pkgnum src_subdir dest_subdir . 43 45 if WPI.src_basedir \= '..\' then /* Ignore src_subdir from file if not using build subtree */ 44 46 src_subdir = '.' 45 47 dest_basedir = MakePackageDir( pkgnum ) 46 dest_dir = dest_basedir || '\' || strip(dest_subdir)47 call SysMkDir dest_dir48 'copy ' || WPI.src_basedir || src_subdir || '\' || filename || ' ' || dest_dir48 if dest_subdir \= '.' then 49 call MkDir dest_basedir, dest_subdir 50 'copy' WPI.src_basedir || src_subdir || '\' || filename || ' ' || dest_basedir || '\' || dest_subdir 49 51 end 50 52 … … 53 55 54 56 ErrorExit: 57 WPI.retval = 1 55 58 parse arg errorcode 56 59 select … … 68 71 say ' 'sourceline(sigl) 69 72 signal NormalExit 73 end 74 when errorcode = 6 then 75 do 76 say 'Error: Unable to create package staging subdirectory.' 70 77 end 71 78 otherwise … … 157 164 return full_dirname 158 165 166 /* Creates a directory, including any non-existant parents */ 167 MkDir: procedure expose (globals) 168 parse arg basedir, subdirs 169 curdir = directory() 170 do while subdirs \= '' 171 parse var subdirs subdir '\' subdirs 172 if subdir \= '.' then 173 do 174 dir = basedir || '\' || subdir 175 if translate(dir) \= translate(right(directory(dir), length(dir))) then 176 do 177 rcx = SysMkDir(dir) 178 if rcx \= 0 then 179 call ErrorExit 6 180 end 181 call directory curdir 182 basedir = dir 183 end 184 end 185 return 186
Note:
See TracChangeset
for help on using the changeset viewer.