Newer
Older
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
@echo off
REM Echo the steps the script will perform
echo This script will:
echo 1. Check if dependencies are installed.
echo 2. Pull the latest changes from the specified remote repository.
echo 3. If the .git folder is not found, clone the repository from the specified URL. (https://gitgud.io/pregmodfan/fc-pregmod.git)
REM Get the directory where the batch file is located (repository directory)
set SCRIPT_DIR=%~dp0
REM Set the URL to clone the repository
set REPO_URL=https://gitgud.io/pregmodfan/fc-pregmod.git
REM Ask if we should proceed with the Git installation check
set /p PROCEED="Do you want to proceed? (y/n): "
if /I "%PROCEED%" neq "y" (
echo Operation aborted.
exit /B 0
)
:: run dependencyCheck.bat
CALL .\devTools\scripts\dependencyCheck.bat
SET CODE=%ERRORLEVEL%
IF %CODE% EQU 0 (
REM Ensure we are inside the Git repository
if exist ".git" (
echo Pulling the latest changes from the specified remote repository...
git pull origin
) else (
echo .git folder not found. Cloning the repository...
REM Initialize a new Git repository and set the origin
git init
git remote add origin %REPO_URL%
git pull origin pregmod-master
)
echo Update complete!
)
@echo Exit