Files
doa_doppler_est/pack_submission.bat
T
josh d3a24f84d9 meta: 新增 pack_submission.bat 用于打包 submission
适配自其他项目的通用模板,按本仓库结构改三处:
- 输出文件名改为 doa_doppler_est.zip
- 图片目录从 figures 改为 fig,扩展名补 bmp(场景图为 bmp)
- 去掉 *.bbl 的拷贝,本仓库 \printbibliography 注释掉了,
  bbl 是 build 产物,保留会把 *.bbl-SAVE-ERROR 一起带进 zip
2026-06-15 10:26:56 +08:00

78 lines
2.3 KiB
Batchfile

@echo off
setlocal enabledelayedexpansion
rem ============================================================
rem Pack necessary LaTeX paper files into a zip archive.
rem Run this .bat in the paper root directory.
rem ============================================================
set "ZIPNAME=doa_doppler_est.zip"
set "TEMPDIR=_pack"
rem Clean old package folder and zip
if exist "%TEMPDIR%" rmdir /s /q "%TEMPDIR%"
if exist "%ZIPNAME%" del /q "%ZIPNAME%"
mkdir "%TEMPDIR%"
rem ------------------------------------------------------------
rem Copy main LaTeX source files
rem ------------------------------------------------------------
copy /y "*.tex" "%TEMPDIR%\" >nul 2>nul
copy /y "*.bib" "%TEMPDIR%\" >nul 2>nul
copy /y "*.bst" "%TEMPDIR%\" >nul 2>nul
copy /y "*.cls" "%TEMPDIR%\" >nul 2>nul
copy /y "*.sty" "%TEMPDIR%\" >nul 2>nul
rem ------------------------------------------------------------
rem Copy common subfolders
rem ------------------------------------------------------------
if exist "parts" (
xcopy "parts" "%TEMPDIR%\parts\" /e /i /y >nul
)
if exist "fig" (
mkdir "%TEMPDIR%\fig"
for %%E in (pdf eps png jpg jpeg bmp) do (
for /r "fig" %%F in (*.%%E) do (
set "SRC=%%F"
set "DST=!SRC:%CD%\fig=%TEMPDIR%\fig!"
for %%D in ("!DST!") do if not exist "%%~dpD" mkdir "%%~dpD"
copy /y "%%F" "!DST!" >nul
)
)
)
rem ------------------------------------------------------------
rem Remove LaTeX temporary files if any were copied accidentally
rem ------------------------------------------------------------
for /r "%TEMPDIR%" %%F in (
*.aux *.log *.out *.toc *.lof *.lot *.fls *.fdb_latexmk
*.synctex.gz *.blg *.run.xml *.bcf *.gz
) do (
del /q "%%F" >nul 2>nul
)
rem ------------------------------------------------------------
rem Create zip archive using PowerShell
rem ------------------------------------------------------------
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"Compress-Archive -Path '%TEMPDIR%\*' -DestinationPath '%ZIPNAME%' -Force"
if errorlevel 1 (
echo.
echo ERROR: Failed to create package.
echo Please check whether PowerShell is available and whether the files are locked.
echo.
pause
exit /b 1
)
rem Clean temporary folder
rmdir /s /q "%TEMPDIR%"
echo.
echo Package created: %ZIPNAME%
echo.
exit /b 0