@@ -10,21 +10,11 @@ IF "%packId%"=="" (
10
10
echo %ESC% [31mMissing pack id, if you renamed this bat file undo your changes otherwise contact FTB%ESC% [0m
11
11
exit /b 1
12
12
)
13
- IF " %packId% " == " REPLACE_ME" (
14
- echo %ESC% [31mInvalid pack id " %packVersion% " , please contact FTB%ESC% [0m
15
- exit /b 1
16
- )
13
+
17
14
IF " %packVersion% " == " " (
18
15
echo %ESC% [31mMissing pack version, if you renamed this bat file undo your changes otherwise contact FTB%ESC% [0m
19
16
exit /b 1
20
17
)
21
- IF " %packVersion% " == " REPLACE_ME" (
22
- echo %ESC% [31mInvalid pack version " %packVersion% " , please contact FTB%ESC% [0m
23
- exit /b 1
24
- )
25
-
26
- echo PackId: %packId%
27
- echo PackVersion: %packVersion%
28
18
29
19
reg query " HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE > nul 2 >& 1
30
20
for /f " tokens=3" %%A in ('reg query " HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE 2^ > nul ') do set " sysArch = %%A "
@@ -39,13 +29,22 @@ set "completeUrl=%downloadUrl%windows-%arch%.exe"
39
29
40
30
echo Downloading FTB Server Installer from: %completeUrl%
41
31
42
- curl -L -o serverinstaller_%packId% _%packVersion% .exe %completeUrl%
32
+ set " fileName = ftb-server-installer"
33
+
34
+ IF NOT " %packId% " == " REPLACE_ME" (
35
+ set " fileName = %fileName% -%packId% "
36
+ )
37
+ IF NOT " %packVersion% " == " REPLACE_ME" (
38
+ set " fileName = %fileName% -%packVersion% "
39
+ )
40
+
41
+ curl -L -o %fileName% .exe %completeUrl%
43
42
44
43
IF %ERRORLEVEL% NEQ 0 (
45
44
echo %ESC% [31mFailed to download the file. Please check the URL or your internet connection.%ESC% [0m
46
45
pause
47
46
exit /b %ERRORLEVEL%
48
47
)
49
48
50
- echo %ESC% [32mDownloaded FTB Server Installer to: %~dp0 serverinstaller_ %packId% _ %packVersion % .exe%ESC% [0m
51
- echo %ESC% [36mYou can now run the installer using the command: .\serverinstaller_ %packId% _ %packVersion % .exe%ESC% [0m
49
+ echo %ESC% [32mDownloaded FTB Server Installer to: %~dp0 %fileName % .exe%ESC% [0m
50
+ echo %ESC% [36mYou can now run the installer using the command: .\%fileName % .exe%ESC% [0m
0 commit comments