]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed the script so that it fails when a copy fails
authorYann Collet <cyan@fb.com>
Thu, 27 Feb 2025 22:33:49 +0000 (14:33 -0800)
committerYann Collet <cyan@fb.com>
Fri, 28 Feb 2025 00:18:44 +0000 (16:18 -0800)
and also: fix the list of files, as `zdict.h` was incorrectly set.

lib/dll/example/build_package.bat

index 4b750137e98e5af7f555ce6649b29545051f0338..5a03bdf25acee989eb8d9a86d9472ac84ad4de71 100644 (file)
@@ -21,12 +21,16 @@ call :copyFile "lib\dll\example\fullbench-dll.*" "bin\example\"
 call :copyFile "lib\dll\example\README.md" "bin\"
 call :copyFile "lib\zstd.h" "bin\include\"
 call :copyFile "lib\zstd_errors.h" "bin\include\"
-call :copyFile "lib\dictBuilder\zdict.h" "bin\include\"
+call :copyFile "lib\zdict.h" "bin\include\"
 call :copyFile "programs\zstd.exe" "bin\zstd.exe"
 
 endlocal
-exit /b
+exit /b 0
 
 :copyFile
-copy "%~1" "%~2" || (echo Failure processing "%~1" & exit /b %errorlevel%)
-goto :eof
+copy "%~1" "%~2"
+if errorlevel 1 (
+    echo Failed to copy "%~1"
+    exit 1
+)
+exit /b