33 lines
835 B
Batchfile
33 lines
835 B
Batchfile
@echo off
|
|
echo Copying network image to website/static/network-bg.jpg...
|
|
|
|
if not exist "website\static" (
|
|
echo Error: website/static directory does not exist.
|
|
echo Make sure you are running this script from the main project directory.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
if "%~1"=="" (
|
|
echo Usage: copy-network-image.bat [path_to_image]
|
|
echo Example: copy-network-image.bat d2efd014-1325-471f-b9a7-90d025eb81d6.png
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
if not exist "%~1" (
|
|
echo Error: The specified image file "%~1" does not exist.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
copy /Y "%~1" "website\static\network-bg.jpg" > nul
|
|
|
|
if %errorlevel% equ 0 (
|
|
echo Success! The image has been copied to website/static/network-bg.jpg
|
|
echo Please restart the Flask server to see the changes.
|
|
) else (
|
|
echo Error: Failed to copy the image.
|
|
)
|
|
|
|
pause |