-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1_0_setup.bat
52 lines (43 loc) · 1.45 KB
/
1_0_setup.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
@echo on
:: Setup script using BusyBox for portability
:: Define URLs and filenames
set BUSYBOX_URL=https://frippery.org/files/busybox/busybox.exe
set BUSYBOX_EXE=busybox.exe
set SCRIPT_NAME=1_0_setup.sh
echo --------------------------------------------
echo Checking for BusyBox...
echo --------------------------------------------
:: Check if BusyBox is present
if not exist %BUSYBOX_EXE% (
echo BusyBox not found. Downloading BusyBox...
curl -L -o %BUSYBOX_EXE% %BUSYBOX_URL%
if %errorlevel% neq 0 (
echo Failed to download BusyBox. Please check your internet connection and try again.
pause
exit /b 1
)
echo BusyBox downloaded successfully.
) else (
echo BusyBox is already present.
)
:: Ensure the shell script exists
if not exist %SCRIPT_NAME% (
echo Shell script "%SCRIPT_NAME%" not found. Please ensure it is in the same directory.
pause
exit /b 1
)
echo --------------------------------------------
echo Executing the shell script with BusyBox...
echo --------------------------------------------
:: Execute the shell script using BusyBox
%BUSYBOX_EXE% sh %SCRIPT_NAME%
:: Check for errors during execution
if %errorlevel% neq 0 (
echo Shell script execution failed. Exiting...
pause
exit /b 1
)
echo --------------------------------------------
echo Shell script executed successfully!
echo --------------------------------------------
pause