This commit is contained in:
2024-03-26 12:17:33 +03:00
parent f49d9f8860
commit 91ba361af9
97 changed files with 6127 additions and 5997 deletions

View File

@@ -18,12 +18,10 @@
@echo off
FOR %%f IN (bin\*) DO (
if "%%~xf" == ".exe" (
set filename=bin\%%~nf
) else (
set filename=%%f
)
cd /d "%~dp0"
pushd .\bin\
for %%f in (*.exe) do (
set filename=%%~nf
)
for /F "tokens=1,2,3,4 delims=_" %%a in ("%filename%") do (
@@ -32,27 +30,16 @@ for /F "tokens=1,2,3,4 delims=_" %%a in ("%filename%") do (
set arch=%%d
)
if "%os%" neq "windows" (
echo Unable to find provider executable, is it moved or renamed?
pause
exit /b
)
set provider_path=%appdata%\terraform.d\plugins\basis\decort\decort\%version%\%os%_%arch%\
if exist %provider_path% (
echo Provider directory already exists, checking for decort provider executable..
dir /b /s /a "%provider_path%" | findstr .>nul || (
copy %filename% %provider_path%\terraform-provider-decort.exe
copy /y %filename%.exe %provider_path%
if errorlevel 1 (
pause
exit /b
)
call :print_success
pause
exit /b
)
echo DECORT provider version %version% is already installed. Exiting.
call :print_success
pause
exit /b
) else (
@@ -62,7 +49,7 @@ if exist %provider_path% (
pause
exit /b
)
copy %filename% %provider_path%\terraform-provider-decort.exe
copy %filename%.exe %provider_path%
if errorlevel 1 (
pause
exit /b
@@ -84,4 +71,4 @@ echo source = "basis/decort/decort"
echo }
echo }
echo }
goto:eof
goto:eof