-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdobuild.bat
100 lines (80 loc) · 2.92 KB
/
dobuild.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
REM
REM Copyright 2011 Jeremy Schneider
REM
REM This file is part of RAC-ATTACK.
REM
REM RAC-ATTACK is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM RAC-ATTACK is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
REM
REM
call setupenv.bat
echo "SOURCEDIR: %SOURCEDIR%"
echo "CAUTION: THIS WILL DELETE THE CURRENT IMAGES. ARE YOU SURE? (CTRL-C to ABORT)"
pause
time /t
call %VMRUNBIN% -T server -h https://127.0.0.1:8333/sdk -u %MYUSER% -p %MYPASS% stop "[RAC11g] collabn1\collabn1.vmx" hard
call %VMRUNBIN% -T server -h https://127.0.0.1:8333/sdk -u %MYUSER% -p %MYPASS% unregister "[RAC11g] collabn1\collabn1.vmx"
call %VMRUNBIN% -T server -h https://127.0.0.1:8333/sdk -u %MYUSER% -p %MYPASS% stop "[RAC11g] collabn2\collabn1.vmx" hard
call %VMRUNBIN% -T server -h https://127.0.0.1:8333/sdk -u %MYUSER% -p %MYPASS% unregister "[RAC11g] collabn2\collabn1.vmx"
time /t
mkdir %DESTDRIVE%\%DESTDIR%
mkdir %DESTDRIVE%\%DESTDIR%\collabn1
mkdir %DESTDRIVE%\%DESTDIR%\collabn2
mkdir %DESTDRIVESHARED%\%DESTDIRSHARED%
%DESTDRIVE%
cd \%DESTDIR%\collabn1
del /q vmware*.log
del /q collabn1.vmx.orig
move /Y collabn1.vmx collabn1.vmx.orig
%MD5BIN% * >checksum.md5
type checksum.md5 | find /V "checksum" > c2.md5
move /Y c2.md5 checksum.md5
time /t
cd \%DESTDIR%\collabn2
del /q vmware*.log
del /q collabn1.vmx.orig
move /Y collabn1.vmx collabn1.vmx.orig
%MD5BIN% * >checksum.md5
type checksum.md5 | find /V "checksum" > c2.md5
move /Y c2.md5 checksum.md5
time /t
%DESTDRIVESHARED%
cd \%DESTDIRSHARED%
del /q *.RESLCK
%MD5BIN% * >checksum.md5
type checksum.md5 | find /V "checksum" > c2.md5
move /Y c2.md5 checksum.md5
type checksum.md5 | find /V "source.txt" > c2.md5
move /Y c2.md5 checksum.md5
time /t
%SOURCEDRIVE%
mkdir \%SOURCEDIR%
mkdir \%SOURCEDIR%.prev
del /q \%SOURCEDIR%.prev\*.lzo
move /y \%SOURCEDIR%\* \%SOURCEDIR%.prev
cd \%SOURCEDIR%
%LZOPBIN% -FPvo collabn1.lzo %DESTDRIVE%\%DESTDIR%\collabn1\*
time /t
%LZOPBIN% -FPvo collabn2.lzo %DESTDRIVE%\%DESTDIR%\collabn2\*
time /t
%LZOPBIN% -FPvo shared.lzo %DESTDRIVESHARED%\%DESTDIRSHARED%\*
time /t
%DESTDRIVE%
cd \%DESTDIR%\collabn1
move /Y collabn1.vmx.orig collabn1.vmx
cd \%DESTDIR%\collabn2
move /Y collabn1.vmx.orig collabn1.vmx
call %VMRUNBIN% -T server -h https://127.0.0.1:8333/sdk -u %MYUSER% -p %MYPASS% register "[RAC11g] collabn1\collabn1.vmx"
call %VMRUNBIN% -T server -h https://127.0.0.1:8333/sdk -u %MYUSER% -p %MYPASS% register "[RAC11g] collabn2\collabn1.vmx"
time /t
pause