Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / common / update-common
1 #!/bin/sh
2 #
3 # This script will update all the modules listed below so that
4 # common points to master in the common module.
5 #
6 # If you have many of the GStreamer modules checked out in a particular
7 # directory, it's best to run this script from that directory.  For
8 # example, I check everything out in ~/gst, so this file is
9 # ~/gst/common/update-common.  To do an update, I do
10 # 'cd ~/gst ; ./common/update-common'.  This will automatically use
11 # the refs in your existing checkout when cloning the temporary
12 # checkout.  Alternatively, you can use the reference variable below.
13 #
14
15 # Set this variable to point to any directory containing existing
16 # git # checkouts, and git will pull objects from there, decreasing
17 # network usage.
18 reference=~/gst
19
20 set -e
21 set -x
22
23 modules="gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad \
24         gst-plugins-ugly gst-ffmpeg gst-python \
25         gnonlin gst-plugins-gl gst-rtsp-server gst-editing-services"
26
27 topdir=`pwd`
28 dir=`mktemp -d $topdir/common-update-XXXXXX`
29
30 for module in $modules
31 do
32   cd $dir
33   if test -e $reference/$module/.git ; then
34     git clone --reference $reference/$module/.git --shared ssh://git.freedesktop.org/git/gstreamer/$module
35   elif test -e $topdir/$module/.git ; then
36     git clone --reference $topdir/$module/.git --shared ssh://git.freedesktop.org/git/gstreamer/$module
37   else
38     git clone ssh://git.freedesktop.org/git/gstreamer/$module
39   fi
40   cd $dir/$module
41   git submodule init
42   git submodule update
43   cd $dir/$module/common
44   ref_from=`git log --pretty=format:%h -n 1 HEAD`
45   git checkout master
46   git pull origin
47   ref_to=`git log --pretty=format:%h -n 1 HEAD`
48   echo updating common from $ref_from to $ref_to
49   if [ "$ref_from" != "$ref_to" ] ; then
50     cd $dir/$module
51     git add common
52     git commit -m "Automatic update of common submodule
53
54 From $ref_from to $ref_to"
55   fi
56   cd $dir
57 done
58
59 for module in $modules
60 do
61   cd $dir/$module
62   git push origin
63 done
64
65 rm -rf $dir