Phase 3.1: Enhanced Chore Logging and Reporting System
This commit is contained in:
82
download-source.bat
Normal file
82
download-source.bat
Normal file
@@ -0,0 +1,82 @@
|
||||
@echo off
|
||||
echo ========================================
|
||||
echo Downloading Family Hub Source Code
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Check if git is available
|
||||
where git >nul 2>nul
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo [Git detected] Cloning repository...
|
||||
echo.
|
||||
|
||||
REM Clone the repository
|
||||
git clone https://gitea.hideawaygaming.com.au/jessikitty/family-hub.git temp
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo ERROR: Failed to clone repository
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Copy backend and frontend folders
|
||||
echo Copying backend files...
|
||||
xcopy /E /I /Y temp\backend backend
|
||||
|
||||
echo Copying frontend files...
|
||||
xcopy /E /I /Y temp\frontend frontend
|
||||
|
||||
REM Clean up
|
||||
echo Cleaning up...
|
||||
rmdir /S /Q temp
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo SUCCESS! Source code downloaded.
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Next steps:
|
||||
echo 1. Run setup.bat to initialize the environment
|
||||
echo 2. Run start-all.bat to start the application
|
||||
echo.
|
||||
pause
|
||||
exit /b 0
|
||||
) else (
|
||||
echo [No Git found] Using PowerShell to download...
|
||||
echo.
|
||||
|
||||
REM Use PowerShell to download and extract
|
||||
powershell -Command "& { ^
|
||||
Write-Host 'Downloading repository archive...'; ^
|
||||
$url = 'https://gitea.hideawaygaming.com.au/jessikitty/family-hub/archive/main.zip'; ^
|
||||
$output = 'temp.zip'; ^
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ^
|
||||
Invoke-WebRequest -Uri $url -OutFile $output; ^
|
||||
Write-Host 'Extracting files...'; ^
|
||||
Expand-Archive -Path $output -DestinationPath temp -Force; ^
|
||||
Write-Host 'Copying files...'; ^
|
||||
Copy-Item -Path 'temp\family-hub\backend' -Destination 'backend' -Recurse -Force; ^
|
||||
Copy-Item -Path 'temp\family-hub\frontend' -Destination 'frontend' -Recurse -Force; ^
|
||||
Write-Host 'Cleaning up...'; ^
|
||||
Remove-Item temp.zip; ^
|
||||
Remove-Item -Recurse -Force temp; ^
|
||||
Write-Host 'Done!'; ^
|
||||
}"
|
||||
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo ERROR: Failed to download repository
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo SUCCESS! Source code downloaded.
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Next steps:
|
||||
echo 1. Run setup.bat to initialize the environment
|
||||
echo 2. Run start-all.bat to start the application
|
||||
echo.
|
||||
pause
|
||||
exit /b 0
|
||||
)
|
||||
Reference in New Issue
Block a user