summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv/stable-30/git_src/checkout_mythweb.sh
blob: 5ba77cb29aa52507e2f79beb672845a0e7b6d878 (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 Mythweb source
#This source should be used build all mythplugins & main program

_gitroot="https://github.com/MythTV/mythweb.git"
_gitname="mythweb"
_gitbranch="fixes/30"

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_web`

if [ -d $_gitname ]
then
    cd $_gitname
    git checkout $_gitbranch
    git pull
    echo "The local files are updated."
    cd $startdir
else
    git clone -b $_gitbranch $_gitroot
fi

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