summaryrefslogtreecommitdiff
path: root/Checkpatch.sh
blob: 5549988e159117230113a9caad1513a70e8e0775 (plain)
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
#!/bin/sh

DIR=`dirname $0`

if [ ! -f "$DIR/../../../osd.c" ]; then
    echo
    echo
    echo "Warning while building ttxtsubs plugin:"
    echo $0: "Can not find VDR's osd.c so can not check for correct patch!"
    echo
    echo
    exit 0;
fi

grep vdrttxtsubshooks "$DIR/../../../osd.c" >> /dev/null;
if [ $? -ne 0 ]; then
    echo
    echo
    echo "Error while building ttxtsubs plugin:"
    echo "You have not patched your VDR - please read the README!"
    echo
    echo
    exit 1;
fi

grep OSD_HOOK_2 "$DIR/../../../osd.c" >> /dev/null;
if [ $? -ne 0 ]; then
    echo
    echo
    echo "Error while building ttxtsubs plugin:"
    echo "       You have an older version of the VDR patch installed!"
    echo "       You need to upgrade it."
    echo "       Please do:"
    echo "        cd /path/to/vdr    [ replace with your path ]"
    echo "        patch -b < PLUGINS/src/ttxtsubs/VDR.upgrade-patch"
    echo "        make"
    echo
    exit 1;
fi