Files
ProjectStructure_HOME/NewProject.bat

51 lines
1.6 KiB
Batchfile
Raw Normal View History

2025-08-08 13:33:08 -06:00
@echo off
setlocal
2025-08-17 14:22:09 -06:00
:: Get current date in YYYY-MM-DD format
2025-08-08 13:33:08 -06:00
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (
set mm=%%a
set dd=%%b
set yy=%%c
)
2025-08-17 14:22:09 -06:00
set yyyy=20%yy:~-2%
2025-08-08 13:33:08 -06:00
:: Ask for project name
set /p projectName="Enter project name (press Enter for default 'NewProject'): "
if "%projectName%"=="" set projectName=NewProject
2025-08-17 14:22:09 -06:00
set projectRoot=%yyyy%-%mm%-%dd%_%projectName%
2025-08-08 13:33:08 -06:00
:: Create main project directory
mkdir "%projectRoot%"
mkdir "%projectRoot%\Assets\VO"
2025-08-17 14:27:16 -06:00
if exist "%~dp0NewDaily.bat" copy /Y "%~dp0NewDaily.bat" "%projectRoot%\Assets\VO\NewDaily.bat" >nul
2025-08-08 13:33:08 -06:00
:: Create Deliverable structure
mkdir "%projectRoot%\Deliverable\"
:: Create Pr structure
mkdir "%projectRoot%\Pr\RnR\RIFE"
2025-08-08 16:48:08 -06:00
:: Add project root additions
if not exist "%projectRoot%\Renders" mkdir "%projectRoot%\Renders"
:: Place helper scripts into Renders
2025-08-17 14:27:16 -06:00
if exist "%~dp0NewDaily.bat" copy /Y "%~dp0NewDaily.bat" "%projectRoot%\Renders\NewDaily.bat" >nul
if exist "%~dp0UpdateSequences.bat" copy /Y "%~dp0UpdateSequences.bat" "%projectRoot%\Renders\UpdateSequences.bat" >nul
2025-08-08 16:48:08 -06:00
:: Use repo-provided templates for git config files
2025-08-17 14:27:16 -06:00
if exist "%~dp0components\gitignore" copy /Y "%~dp0components\gitignore" "%projectRoot%\.gitignore" >nul
if exist "%~dp0components\gitattributes" copy /Y "%~dp0components\gitattributes" "%projectRoot%\.gitattributes" >nul
2025-08-08 16:48:08 -06:00
:: Initialize git and install Git LFS
pushd "%projectRoot%" >nul
git init
2025-08-20 14:46:06 -06:00
git config --global --add safe.directory "%projectRoot%"
2025-08-08 16:48:08 -06:00
git lfs install
2025-08-20 14:40:49 -06:00
git add . -v
git commit -m "init"
2025-08-08 16:48:08 -06:00
popd >nul
2025-08-08 13:33:08 -06:00
echo Project structure created successfully in folder: %projectRoot%
pause