forked from wearefrank/frank-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrestart.bat
55 lines (55 loc) · 2.59 KB
/
restart.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
:: This file is generated by build.xml
@echo off
setlocal enabledelayedexpansion
if not exist "%~dp0download\" (
mkdir "%~dp0download"
)
if not exist "%~dp0build\tmp\build\" (
mkdir "%~dp0build\tmp\build"
)
set DOWNLOAD_HELP=download https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_x64_windows_hotspot_8u252b09.zip manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\OpenJDK8U-jdk_x64_windows_hotspot_8u252b09.zip" (
echo In case of errors %DOWNLOAD_HELP%
curl -f -o "%~dp0download\OpenJDK8U-jdk_x64_windows_hotspot_8u252b09.zip.tmp" -L https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_x64_windows_hotspot_8u252b09.zip
if !errorlevel! neq 0 (
echo Please %DOWNLOAD_HELP%
goto error
)
move "%~dp0download\OpenJDK8U-jdk_x64_windows_hotspot_8u252b09.zip.tmp" "%~dp0download\OpenJDK8U-jdk_x64_windows_hotspot_8u252b09.zip"
)
if not exist "%~dp0build\jdk8u252-b09\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\OpenJDK8U-jdk_x64_windows_hotspot_8u252b09.zip" -C "%~dp0build\tmp\build"
if !errorlevel! neq 0 (
echo Please %DOWNLOAD_HELP%
goto error
)
move "%~dp0build\tmp\build\jdk8u252-b09" "%~dp0build\jdk8u252-b09"
)
set DOWNLOAD_HELP=download https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz manually, move it to %~dp0download and restart this script
if not exist "%~dp0download\apache-ant-1.10.10-bin.tar.gz" (
echo In case of errors %DOWNLOAD_HELP%
curl -f -o "%~dp0download\apache-ant-1.10.10-bin.tar.gz.tmp" -L https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.10-bin.tar.gz
if !errorlevel! neq 0 (
echo Please %DOWNLOAD_HELP%
goto error
)
move "%~dp0download\apache-ant-1.10.10-bin.tar.gz.tmp" "%~dp0download\apache-ant-1.10.10-bin.tar.gz"
)
if not exist "%~dp0build\apache-ant-1.10.10\" (
tar --exclude=*/demo --exclude=*/sample --exclude=*/manual --exclude=*/src.zip -xvf "%~dp0download\apache-ant-1.10.10-bin.tar.gz" -C "%~dp0build\tmp\build"
if !errorlevel! neq 0 (
echo Please %DOWNLOAD_HELP%
goto error
)
move "%~dp0build\tmp\build\apache-ant-1.10.10" "%~dp0build\apache-ant-1.10.10"
)
set JAVA_HOME=%~dp0build\jdk8u252-b09
set ANT_HOME=%~dp0build\apache-ant-1.10.10
call "%~dp0build\apache-ant-1.10.10\bin\ant" -emacs -buildfile "%~dp0build.xml" %* restart
if %errorlevel% equ 0 goto end
:error
rem https://superuser.com/questions/527898/how-to-pause-only-if-executing-in-a-new-window
set arg0=%0
if [%arg0:~2,1%]==[:] if not [%TERM_PROGRAM%] == [vscode] pause
exit /b %errorlevel%
:end