Some clean-up and simplification for JobObject class.
[MUtilities.git] / z_mkpack.bat
blob29c01be697ce10dcc036fa94c27de310e011fad3
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 mkdir "%OUT_PATH%\MUtilities"
9 call::git_export "%~dp0\." MUtilities
11 pushd "%OUT_PATH%"
12 tar -cvf ./sources.tar *
13 "%~dp0\..\Prerequisites\SevenZip\7za.exe" a -txz "%~dp0\~sources.tar.xz" "sources.tar"
14 popd
16 cd /d "%~dp0"
17 rmdir /S /Q "%OUT_PATH%"
19 pause
20 exit
23 :git_export
24 pushd "%~1"
25 git archive --verbose --output "%OUT_PATH%\%~2.tar" MASTER
26 popd
27 pushd "%OUT_PATH%\%~2"
28 tar -xvf "../%~2.tar"
29 del "%OUT_PATH%\%~2.tar"
30 popd
31 goto:eof