summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv/stable-0.25/git_src/checkout_mythtv.sh
blob: 8a5b6c5186486787f55d7ed206c846ae9db1a984 (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
#!/bin/bash
#Quick script used to checkout the MythTV source
#This source should be used build all mythplugins & main program
#76df8e6c8f7b84a157607d8c25fd19f39d8dc830
_gitroot="https://github.com/MythTV/mythtv.git"
_gitname="mythtv"
startdir=`pwd`
#Set this to True, to update mythtv to the latest.
#If not true then it will use the hash stored in git_hash
_current="True"

_checkoutHASH=`cat git_hash`

if [ -d $_gitname ]
then
    cd $_gitname 
    git checkout master
    git pull
    

    echo "The local files are updated."
else
    git clone -b fixes/0.25 $_gitroot
fi

if [ -d $_gitname ]
then
    cd $_gitname 
    if [ $_current == True ]
    then
        git rev-parse HEAD > $startdir/git_hash
    else
        git checkout $_checkoutHASH
    fi
fi
echo "GIT checkout done or server timeout"