From 856cd870f6de3e96e989a2f4f8a98679909abe2d Mon Sep 17 00:00:00 2001 From: gmega Date: Fri, 4 Oct 2024 20:00:48 -0300 Subject: [PATCH] remove utils.bat as function definitions were not being exported --- scripts/windows/download-online.bat | 3 ++- scripts/windows/download.bat | 3 ++- scripts/windows/run-client.bat | 3 ++- scripts/windows/utils.bat | 35 ----------------------------- 4 files changed, 6 insertions(+), 38 deletions(-) delete mode 100644 scripts/windows/utils.bat diff --git a/scripts/windows/download-online.bat b/scripts/windows/download-online.bat index 1403c55..9bc42e5 100644 --- a/scripts/windows/download-online.bat +++ b/scripts/windows/download-online.bat @@ -1,7 +1,8 @@ @echo off setlocal enabledelayedexpansion -call utils.bat +:: Variables +if not defined NETWORK set NETWORK=testnet :: Set variables set "OS=windows" diff --git a/scripts/windows/download.bat b/scripts/windows/download.bat index 29d0947..44d92ec 100644 --- a/scripts/windows/download.bat +++ b/scripts/windows/download.bat @@ -1,7 +1,8 @@ @echo off setlocal enabledelayedexpansion -call utils.bat +:: Variables +if not defined NETWORK set NETWORK=testnet :: Set variables set "OS=windows" diff --git a/scripts/windows/run-client.bat b/scripts/windows/run-client.bat index cd059c1..16ceeb6 100644 --- a/scripts/windows/run-client.bat +++ b/scripts/windows/run-client.bat @@ -1,7 +1,8 @@ @echo off setlocal enabledelayedexpansion -call utils.bat +:: Variables +if not defined NETWORK set NETWORK=testnet :: Check if LOCALIP is provided as an argument if "%1" neq "" ( diff --git a/scripts/windows/utils.bat b/scripts/windows/utils.bat deleted file mode 100644 index 1c2dea1..0000000 --- a/scripts/windows/utils.bat +++ /dev/null @@ -1,35 +0,0 @@ -@echo off - -:: Variables -if not defined NETWORK set NETWORK=testnet - -:: Function to detect OS -:get_os - echo windows -exit /b - -:: Function to detect CPU architecture -:get_arch - set "arch_result=unknown" - for /f "tokens=2 delims=:" %%a in ('systeminfo ^| find "System Type"') do ( - echo %%a | find "x64" > nul - if not errorlevel 1 set "arch_result=amd64" - echo %%a | find "ARM" > nul - if not errorlevel 1 set "arch_result=arm64" - ) - if "%arch_result%"=="unknown" ( - echo Unsupported architecture: %PROCESSOR_ARCHITECTURE% - exit /b 1 - ) - set "%1=%arch_result%" -exit /b - -:: Function to get IP -:get_ip - for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr /c:"IPv4 Address"') do ( - set "%1=%%a" - set "%1=!%1: =!" - goto :break - ) - :break -exit /b