File: test_msi.bat

package info (click to toggle)
pympress 1.5.3%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 876 kB
  • sloc: python: 3,526; sh: 84; makefile: 17
file content (41 lines) | stat: -rw-r--r-- 758 bytes parent folder | download
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
@echo off
for /r %%f in (dist\*.msi) do (set "installer=%%~f")

if "%installer%" == "" (
    echo **** INSTALLER MISSING ****
    exit /b 1
)

msiexec /l*v installer.log /qb /i "%installer%"

if errorlevel 1 (
    echo **** INSTALLER FAILED ****
    type installer.log
    goto :eof
)

for %%d in (
    "%programfiles%\pympress"
    "%programfiles(x86)%\pympress"
    "%APPDATA%\Programs\pympress"
    "%LOCALAPPDATA%\Programs\pympress"
) do (
    echo %%d
    if exist %%d (
        %%d\pympress --help

        if errorlevel 1 (goto :err)

        echo
        echo Warnings in log file:
        type %LOCALAPPDATA%\pympress.log
        goto :eof
    )
)

echo Pympress not found

:err
echo **** TEST FAILED ****
type %LOCALAPPDATA%\pympress.log
exit /b 1