-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_postprocess.cmd
48 lines (40 loc) · 1.02 KB
/
build_postprocess.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
set XPI_FILE=formhistory_1406.xpi
rem --(check if xpi exist)-------------------------------------
if exist %XPI_FILE% goto continue
echo.
echo -------------------------------------------
echo XPI file not found (%XPI_FILE%)!!!
echo -------------------------------------------
echo.
goto error
:continue
rem --(delete incomplete locales)-------------------------------
7z.exe d %XPI_FILE% ^
chrome\locale\bg-BG ^
chrome\locale\hu ^
chrome\locale\it ^
chrome\locale\sk-SK ^
chrome\locale\sv-SE
if errorlevel 1 goto error
rem --(delete all amo.properties)-------------------------------
7z.exe d -r %XPI_FILE% amo.properties
if errorlevel 1 goto error
rem --(delete leftover files)-----------------------------------
7z.exe d -r %XPI_FILE% *.7z
if errorlevel 1 goto error
goto okay
:error
echo.
echo ===============
echo Error detected!
echo ===============
pause
goto end
:okay
echo.
echo --------
echo Finished
echo --------
echo.
:end