-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.bat
36 lines (29 loc) · 1.03 KB
/
install.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
@echo off
setlocal
REM Define the target directory (ensure it's consistent with where you want the scripts)
set "TARGET_DIR=%USERPROFILE%\Scripts"
REM Create the target directory if it doesn't exist
if not exist "%TARGET_DIR%" (
mkdir "%TARGET_DIR%"
)
REM Copy the brainrot.py script to the target directory
xcopy /Y /I "brainrot.py" "%TARGET_DIR%\brainrot.py"
REM Copy the commands directory to the target directory
xcopy /E /I /Y "commands" "%TARGET_DIR%\commands"
REM Create a wrapper batch file to run the Python script
(
echo @echo off
echo python "%~dp0brainrot.py" %%*
) > "%TARGET_DIR%\brainrot.bat"
REM Check if the target directory is in the PATH
echo %PATH% | find /I "%TARGET_DIR%" >nul
if errorlevel 1 (
REM Add the target directory to the PATH for the current user
setx PATH "%PATH%;%TARGET_DIR%"
echo Added %TARGET_DIR% to PATH. You may need to restart your command prompt.
) else (
echo %TARGET_DIR% is already in PATH
)
echo Installation complete. You can now run 'brainrot' from anywhere.
endlocal
pause