begin develop configloader
This commit is contained in:
@@ -1,12 +1,29 @@
|
||||
@echo off
|
||||
setlocal
|
||||
setlocal EnableExtensions
|
||||
|
||||
set "REN_DIR=%~dp0"
|
||||
for %%I in ("%REN_DIR%..") do set "PROJ_ROOT=%%~fI"
|
||||
set "PY_SCRIPT=A:\1 Amazon_Active_Projects\3 ProjectStructure\zip_sequences.py"
|
||||
|
||||
if not exist "%PY_SCRIPT%" (
|
||||
echo Missing %PY_SCRIPT%
|
||||
set "CONFIG_LOADER=%REN_DIR%ConfigLoader.ps1"
|
||||
set "CONFIG_PATH=%REN_DIR%config.json"
|
||||
|
||||
if not exist "%CONFIG_LOADER%" (
|
||||
echo [ERROR] ConfigLoader.ps1 not found next to ZipSeqArchv.bat.
|
||||
echo Please run UpgradeSeqBatches.ps1 to refresh helper files.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%CONFIG_PATH%" (
|
||||
echo [ERROR] config.json not found next to ZipSeqArchv.bat.
|
||||
echo Please run UpgradeSeqBatches.ps1 to refresh helper files.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||
"Set-StrictMode -Version Latest; $loader = Resolve-Path -LiteralPath '%CONFIG_LOADER%' -ErrorAction Stop; . $loader.Path; $pyPath = Join-Path (Get-StructDirectory) 'zip_sequences.py'; if (-not (Test-Path -LiteralPath $pyPath)) { throw \"zip_sequences.py not found at $pyPath\" }; Write-Output $pyPath"`) do set "PY_SCRIPT=%%I"
|
||||
|
||||
if not defined PY_SCRIPT (
|
||||
echo [ERROR] Unable to resolve zip_sequences.py path from config.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user