]>
Commit | Line | Data |
---|---|---|
1 | @echo off | |
2 | rem Tar up an external distribution of OGL | |
3 | ||
4 | if "%1" == "" goto usage | |
5 | if "%2" == "" goto usage | |
6 | echo About to archive an external OGL distribution: | |
7 | echo From %1 | |
8 | echo To %2\ogl.tgz | |
9 | echo CTRL-C if this is not correct. | |
10 | inkey /W4 `Press any key to continue...` %%input | |
11 | ||
12 | erase %2\ogl.tgz | |
13 | cd %1 | |
14 | ||
15 | rem First, expand the wildcards in the ogl.rsp file | |
16 | ||
17 | rem Create empty list file | |
18 | erase %1\distrib\ogl.lis | |
19 | c:\bin\touch %1\distrib\ogl.lis | |
20 | ||
21 | rem Create a .rsp file with backslashes instead | |
22 | rem of forward slashes | |
23 | rem No need if using ls2 (from UNIX95 distribution) | |
24 | rem sed -e "s/\//\\/g" %1\distrib\ogl.rsp > %1\distrib\ogl.rs2 | |
25 | ||
26 | set len=%@LINES[%1\distrib\ogl.rsp] | |
27 | rem set len=%@DEC[%len] | |
28 | do i = 0 to %len by 1 | |
29 | set line=%@LINE[%1\distrib\ogl.rsp,%i] | |
30 | if NOT "%line" == "" ls2 -1 %line >> %1\distrib\ogl.lis | |
31 | enddo | |
32 | ||
33 | tar -c -T %1\distrib\ogl.lis | |
34 | move archive.tar ogl.tar | |
35 | gzip ogl.tar | |
36 | move ogl.taz %2\ogl.tgz | |
37 | ||
38 | echo OGL archived. | |
39 | goto end | |
40 | ||
41 | :usage | |
42 | echo DOS OGL distribution. | |
43 | echo Usage: tarogl source destination | |
44 | echo e.g. tarogl c:\wx\utils\ogl c:\wx\utils\ogl\deliver | |
45 | ||
46 | :end | |
47 | ||
48 |