Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add logic for special "DEMO" jumpstart

  • Loading branch information...
commit 2ced4a25fb3eb4c701b76599e25dfb78dd4922e8 1 parent 96caccd
@ardentperf authored
Showing with 53 additions and 12 deletions.
  1. +23 −12 dojump.bat
  2. +22 −0 jumpstart-DEMO.bat
  3. +8 −0 setupenv.bat
View
35 dojump.bat
@@ -29,29 +29,33 @@ call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %MYUSER% -p %MYPASS%
call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %MYUSER% -p %MYPASS% unregister "[RAC11g] collabn2\collabn1.vmx"
time /t
+if %SOURCEDRIVE%\%SOURCEDIR%==%DESTDRIVESHARED%\RAC-DEMO-INPLACE goto fixup
+
+mkdir %DESTDRIVESHARED%\%DESTDIRSHARED%
+mkdir %DESTDRIVESHARED%\%DESTDIRSHARED%.prev
+del /q %DESTDRIVESHARED%\%DESTDIRSHARED%.prev\*
+move /y %DESTDRIVESHARED%\%DESTDIRSHARED%\* %DESTDRIVESHARED%\%DESTDIRSHARED%.prev
+time /t
+
+if %SOURCEDIR%==RAC-DEMO-INPLACE goto fixup
+
mkdir %DESTDRIVE%\%DESTDIR%
mkdir %DESTDRIVE%\%DESTDIR%\collabn1
mkdir %DESTDRIVE%\%DESTDIR%\collabn2
mkdir %DESTDRIVE%\%DESTDIR%.prev
mkdir %DESTDRIVE%\%DESTDIR%.prev\collabn1
mkdir %DESTDRIVE%\%DESTDIR%.prev\collabn2
-
-mkdir %DESTDRIVESHARED%\%DESTDIRSHARED%
-mkdir %DESTDRIVESHARED%\%DESTDIRSHARED%.prev
-
del /q %DESTDRIVE%\%DESTDIR%.prev\collabn1\*
del /q %DESTDRIVE%\%DESTDIR%.prev\collabn2\*
del /q %DESTDRIVE%\%DESTDIR%.prev\source.txt
-del /q %DESTDRIVESHARED%\%DESTDIRSHARED%.prev\*
-
move /y %DESTDRIVE%\%DESTDIR%\collabn1\* %DESTDRIVE%\%DESTDIR%.prev\collabn1
move /y %DESTDRIVE%\%DESTDIR%\collabn2\* %DESTDRIVE%\%DESTDIR%.prev\collabn2
move /y %DESTDRIVE%\%DESTDIR%\source.txt %DESTDRIVE%\%DESTDIR%.prev
-move /y %DESTDRIVESHARED%\%DESTDIRSHARED%\* %DESTDRIVESHARED%\%DESTDIRSHARED%.prev
time /t
+:fixup
REM ====================== Create Fixup Script =======================
-echo s/fileName.*RAC11g-iso/fileName = ^"%DESTDRIVESHARED%\\%DESTDIRISO%/ >%TEMP%\fixup.sed
+echo s/fileName.*RAC11g-iso/fileName = ^"%DESTDRIVEISO%\\%DESTDIRISO%/ >%TEMP%\fixup.sed
echo s/fileName.*RAC11g-shared/fileName = ^"%DESTDRIVESHARED%\\%DESTDIRSHARED%/ >>%TEMP%\fixup.sed
type %TEMP%\fixup.sed
@@ -66,7 +70,7 @@ time /t >>source.txt
cd \%DESTDIR%\collabn1
rem type %SOURCEDRIVE%\%SOURCEDIR%\collabn1.lzo | %LZOPBIN% -vdNp
rem *** Windows TYPE command is fastest but can't handle >4GB files
-%LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\collabn1.lzo
+if not %SOURCEDIR%==RAC-DEMO-INPLACE %LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\collabn1.lzo
if exist collabn1.vmx.orig (
%SEDBIN% -f %TEMP%\fixup.sed collabn1.vmx.orig >collabn1.vmx
)
@@ -75,7 +79,7 @@ time /t
cd \%DESTDIR%\collabn2
rem type %SOURCEDRIVE%\%SOURCEDIR%\collabn2.lzo | %LZOPBIN% -vdNp
rem *** Windows TYPE command is fastest but can't handle >4GB files
-%LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\collabn2.lzo
+if not %SOURCEDIR%==RAC-DEMO-INPLACE %LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\collabn2.lzo
if exist collabn1.vmx.orig (
%SEDBIN% -f %TEMP%\fixup.sed collabn1.vmx.orig >collabn1.vmx
)
@@ -92,15 +96,21 @@ time /t >>source.txt
cd \%DESTDIRSHARED%
rem type %SOURCEDRIVE%\%SOURCEDIR%\shared.lzo | %LZOPBIN% -vdNp
rem *** Windows TYPE command is fastest but can't handle >4GB files
-%LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\shared.lzo
+if %SOURCEDIR%==RAC-DEMO-INPLACE (
+ if not %SOURCEDRIVE%==%DESTDRIVESHARED% copy /Y %SOURCEDRIVE%\%DESTDIRSHARED%\* .
+) else (
+ %LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\shared.lzo
+)
time /t
call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %MYUSER% -p %MYPASS% register "[RAC11g] collabn1\collabn1.vmx"
call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %MYUSER% -p %MYPASS% register "[RAC11g] collabn2\collabn1.vmx"
del %TEMP%\fixup.sed
-REM ====================== Check New Files ======================
time /t
+if %SOURCEDIR%==RAC-DEMO-INPLACE goto end
+
+REM ====================== Check New Files ======================
%DESTDRIVE%
cd \%DESTDIR%\collabn1
@@ -117,5 +127,6 @@ cd \%DESTDIRSHARED%
%MD5BIN% --check checksum.md5
time /t
+:end
pause
View
22 jumpstart-DEMO.bat
@@ -0,0 +1,22 @@
+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
+
+set SOURCEDIR=RAC-DEMO-INPLACE
+call dojump.bat
View
8 setupenv.bat
@@ -42,6 +42,7 @@ if /i %PROMPTENV% neq YES goto endprompt
cd|sed "s/\\.*//;s/^/set SOURCEDRIVE=/" >%TEMP%\DetectVars.bat
call %TEMP%\DetectVars.bat
+if "%SOURCEDIR%"=="RAC-DEMO-INPLACE" set DESTDRIVE=%SOURCEDRIVE%
echo s/DEFAULT-SOURCEDRIVE/%SOURCEDRIVE%/ >%TEMP%\UserIn.sed
echo s/DEFAULT-DESTDRIVESHARED/%DESTDRIVESHARED%/ >>%TEMP%\UserIn.sed
@@ -92,6 +93,13 @@ set VMRUNBIN="%VMWAREDIR:"=%\vmrun.exe"
set LZOPBIN=%SOURCEDRIVE%\lzop.exe
set MD5BIN=%SOURCEDRIVE%\md5sum
set SEDBIN=%SOURCEDRIVE%\sed
+set DESTDRIVEISO=%DESTDRIVESHARED%
+if "%SOURCEDIR%"=="RAC-DEMO-INPLACE" (
+ set DESTDIR=%DESTDIR%.DEMO
+ set DESTDIRSHARED=%DESTDIRSHARED%.DEMO
+ set DESTDIRISO=%DESTDIRISO%.DEMO
+ set DESTDRIVEISO=%SOURCEDRIVE%
+)
if not exist %LZOPBIN% (
echo ERROR: bad source drive!
Please sign in to comment.
Something went wrong with that request. Please try again.