Bump dates.
[simple-x264-launcher.git] / z_source.bat
blobc08fd27f0227fca1d67856beb213744e14e566be
1 @echo off
2 set "GIT_PATH=c:\Program Files\Git"
3 set "PATH=%GIT_PATH%;%GIT_PATH%\mingw64\bin;%GIT_PATH%\usr\bin;%PATH%"
4 set "OUT_PATH=%TEMP%\~%RANDOM%%RANDOM%.tmp"
6 mkdir "%OUT_PATH%"
7 for %%i in (x264_x64_launcher,MUtilities,Prerequisites) do (
8         mkdir "%OUT_PATH%\%%i"
11 call::git_export "%~dp0"               x264_x64_launcher
12 call::git_export "%~dp0\..\MUtilities" MUtilities
14 copy "%~dp0\Copying.txt" "%OUT_PATH%"
16 mkdir "%OUT_PATH%\Prerequisites"
17 echo Please extract the Prerequisites files here! > "%OUT_PATH%\Prerequisites\README_1ST.txt"
19 pushd "%OUT_PATH%"
20 tar -cvf ./sources.tar *
21 "%~dp0\..\Prerequisites\SevenZip\7za.exe" a -txz "%~dp0\~sources.tar.xz" "sources.tar"
22 popd
24 pushd "%~dp0"
25 rmdir /S /Q "%OUT_PATH%"
27 pause
28 exit
31 :git_export
32 pushd "%~1"
33 git archive --verbose --output "%OUT_PATH%\%~2.tar" MASTER
34 popd
35 pushd "%OUT_PATH%\%~2"
36 tar -xvf "../%~2.tar"
37 del "%OUT_PATH%\%~2.tar"
38 popd
39 goto:eof