Skip to content

Commit cac93a3

Browse files
Updates
1 parent 644f8b0 commit cac93a3

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

codequill_app.bat

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,57 @@
11
@echo off
22
setlocal enabledelayedexpansion
33

4-
rem Function to check if a command was successful
4+
:: Define colors for output
5+
set "GREEN=[92m"
6+
set "RED=[91m"
7+
set "NC=[0m"
8+
9+
:: Function to print colored output
10+
:print_color
11+
echo %~1%~2%NC%
12+
exit /b
13+
14+
:: Function to check if a command was successful
515
:check_success
616
if %errorlevel% equ 0 (
7-
echo %~1
17+
call :print_color "%GREEN%" "%~1"
818
) else (
9-
echo %~1
19+
call :print_color "%RED%" "%~1"
1020
exit /b 1
1121
)
1222
exit /b 0
1323

14-
rem Main installation process
24+
:: Main installation process
1525
:main
16-
echo Starting CodeQuill manager installation...
26+
call :print_color "%GREEN%" "Starting CodeQuill manager installation..."
1727

18-
rem Navigate to user profile directory
28+
:: Navigate to user profile directory
1929
cd %USERPROFILE%
2030
call :check_success "Changed to user profile directory"
2131

22-
rem Download the installation script
32+
:: Download the installation script
2333
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/The-Best-Codes/codequill/main/.device_scripts/codequill.bat', 'codequill.bat')"
2434
if errorlevel 1 (
25-
echo Failed to download installation script
35+
call :print_color "%RED%" "Failed to download installation script"
2636
exit /b 1
2737
)
2838
call :check_success "Downloaded installation script"
2939

30-
rem Run the installation script
40+
:: Run the installation script
3141
call codequill.bat
3242
if errorlevel 1 (
33-
echo Failed to run installation script
43+
call :print_color "%RED%" "Failed to run installation script"
3444
exit /b 1
3545
)
3646
call :check_success "Ran installation script"
3747

38-
echo CodeQuill manager installation complete!
48+
call :print_color "%GREEN%" "CodeQuill manager installation complete!"
3949
exit /b 0
4050

41-
rem Run the main function
51+
:: Run the main function
4252
call :main
4353

44-
rem Keep the command prompt open until a key is pressed
54+
:: Keep the command prompt open until a key is pressed
4555
echo.
46-
echo Press any key to exit.
56+
call :print_color "%GREEN%" "Press any key to exit."
4757
pause >nul

0 commit comments

Comments
 (0)