From 13dab8499044cf071dd1b6a0bae896f80138ab7b Mon Sep 17 00:00:00 2001 From: ueffel Date: Thu, 23 Nov 2017 22:19:00 +0100 Subject: [PATCH] Script to build keypirinha-package --- build_package.cmd | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 build_package.cmd diff --git a/build_package.cmd b/build_package.cmd new file mode 100644 index 0000000..197e138 --- /dev/null +++ b/build_package.cmd @@ -0,0 +1,46 @@ +@echo off +SET SEVENZIP= + +where 7z > nul 2>&1 +if not errorlevel 1 ( + set SEVENZIP=7z + goto pack +) + +where 7za > nul 2>&1 +if not errorlevel 1 ( + set SEVENZIP=7za + goto pack +) + +if exist "c:\Program Files (x86)\7-Zip\7z.exe" ( + SET "SEVENZIP=c:\Program Files (x86)\7-Zip\7z.exe" + goto pack +) + +if exist "c:\Program Files (x86)\7-Zip\7za.exe" ( + SET "SEVENZIP=c:\Program Files (x86)\7-Zip\7za.exe" + goto pack +) + +if exist "c:\Program Files\7-Zip\7z.exe" ( + SET "SEVENZIP=c:\Program Files\7-Zip\7z.exe" + goto pack +) + +if exist "c:\Program Files\7-Zip\7za.exe" ( + SET "SEVENZIP=c:\Program Files\7-Zip\7za.exe" + goto pack +) + +if NOT DEFINED SEVENZIP ( + echo 7zip not found + exit /b 1 +) + +:pack +if exist Kill.keypirinha-package ( + del Kill.keypirinha-package +) +echo Using "%SEVENZIP%" to pack +"%SEVENZIP%" a -mx9 -tzip Kill.keypirinha-package -x!%~nx0 -xr!.git *