-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
wop-test.bat
37 lines (31 loc) · 1.18 KB
/
wop-test.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
@echo off
IF "%1"=="/SL" (set SAVE_LAYOUT=1) ELSE set SAVE_LAYOUT=0
set SYS_ARCH=test
IF %PROCESSOR_ARCHITECTURE%==x86 set SYS_ARCH=win32
IF %PROCESSOR_ARCHITECTURE%==x86_64 set SYS_ARCH=win64
IF %PROCESSOR_ARCHITECTURE%==AMD64 set SYS_ARCH=win64
IF %SYS_ARCH%==test (
echo Fatal Error: Unknown PROCESSOR_ARCHITECTURE
set SYS_ARCH=
exit /B 1 )
set WORK_DIR=%cd%
mkdir "%WORK_DIR%\easyrsa3\bin"
copy "%WORK_DIR%\distro\windows\bin\*" "%WORK_DIR%\easyrsa3\bin"
copy "%WORK_DIR%\distro\windows\%SYS_ARCH%\*" "%WORK_DIR%\easyrsa3\bin"
copy "%WORK_DIR%\distro\windows\EasyRSA-Start.bat" "%WORK_DIR%\easyrsa3\EasyRSA-Start.bat"
PATH=%PATH%;%WORK_DIR%\easyrsa3\bin;C:\PROGRA~1\openssl
cmd /C "easyrsa3\bin\sh.exe wop-test.sh"
IF ERRORLEVEL 1 (
echo Error occurred, Exit 1
exit /B 1 )
REM Success ..
IF %SAVE_LAYOUT% EQU 0 (
echo rmdir /S /Q "%WORK_DIR%\easyrsa3\bin"
rmdir /S /Q "%WORK_DIR%\easyrsa3\bin"
echo del /Q "%WORK_DIR%\easyrsa3\EasyRSA-Start.bat"
del /Q "%WORK_DIR%\easyrsa3\EasyRSA-Start.bat"
REM echo del "%WORK_DIR%\easyrsa3\.rnd"
REM del /Q "%WORK_DIR%\easyrsa3\.rnd"
) ELSE echo NOTICE; Saved Layout
set SAVE_LAYOUT=
set SYS_ARCH=