Testing
This commit is contained in:
parent
732d5fce3a
commit
c165ed3c45
5 changed files with 14 additions and 9 deletions
|
|
@ -1,8 +1,8 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
REM Copy GAMEUPDATE.bat to a new file
|
||||
copy patch.bat patch2.bat
|
||||
REM Copy patch.bat to a new file
|
||||
copy dazedpatch\patch.bat patch2.bat
|
||||
|
||||
REM Run the new file
|
||||
call patch2.bat
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
# Enable error handling
|
||||
set -e
|
||||
|
||||
# Copy patch.bat to a new file
|
||||
cp patch.sh patch2.sh
|
||||
# Copy patch.sh to a new file
|
||||
cp dazedpatch/patch.sh patch2.sh
|
||||
|
||||
# Run the new file
|
||||
bash patch2.sh
|
||||
|
|
|
|||
|
|
@ -27,15 +27,18 @@ if !errorlevel! neq 0 (
|
|||
|
||||
echo Using !_my_shell! for script execution.
|
||||
|
||||
REM Get the directory where this script is located
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
|
||||
REM Check if patch-config.txt exists
|
||||
if not exist patch-config.txt (
|
||||
if not exist "%SCRIPT_DIR%patch-config.txt" (
|
||||
echo "Config file (patch-config.txt) not found! Assuming no patching needed."
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM Read configuration from file
|
||||
for /f "tokens=1,2 delims==" %%a in (patch-config.txt) do (
|
||||
for /f "tokens=1,2 delims==" %%a in (%SCRIPT_DIR%patch-config.txt) do (
|
||||
if "%%a"=="username" set "username=%%b"
|
||||
if "%%a"=="repo" set "repo=%%b"
|
||||
if "%%a"=="branch" set "branch=%%b"
|
||||
|
|
@ -12,7 +12,9 @@ check_dependency jq
|
|||
check_dependency unzip
|
||||
check_dependency curl
|
||||
|
||||
CONFIG_FILE="patch-config.txt"
|
||||
# Get the directory where this script is located
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
CONFIG_FILE="$SCRIPT_DIR/patch-config.txt"
|
||||
|
||||
# Check if CONFIG_FILE exists
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
|
|
@ -25,10 +27,10 @@ sed -i 's/\r$//' "$CONFIG_FILE"
|
|||
|
||||
# Debug information
|
||||
echo "Current directory: $(pwd)"
|
||||
echo "Config file path: $(pwd)/$CONFIG_FILE"
|
||||
echo "Config file path: $CONFIG_FILE"
|
||||
|
||||
# Read configuration from file
|
||||
. "$(pwd)/$CONFIG_FILE"
|
||||
. "$CONFIG_FILE"
|
||||
|
||||
# Get the latest hash
|
||||
echo "Getting latest commit SHA hash"
|
||||
Loading…
Reference in a new issue