@echo off
REM ChuppyCraft — migrar tus ajustes a Prism. Doble clic.
REM Recuerda: NADA de continuaciones con ^ en las llamadas a powershell.
setlocal
set "SERVIDOR=http://chuppycraft.duckdns.org:8091"
set "TMPPS=%TEMP%\ChuppyCraft-Migrar.ps1"

echo.
echo   Descargando el migrador...

powershell -NoProfile -ExecutionPolicy Bypass -Command "(New-Object Net.WebClient).DownloadFile('%SERVIDOR%/ChuppyCraft-Migrar.ps1','%TMPPS%')"

if not exist "%TMPPS%" goto :sinred

powershell -NoProfile -ExecutionPolicy Bypass -File "%TMPPS%" %*
goto :fin

:sinred
echo.
echo   ERROR: no se pudo descargar. Comprueba tu conexion.
echo.
pause

:fin
endlocal
