packaging: gitmodules helper script
[platform/upstream/gstreamer-vaapi.git] / packaging / gitmodules.sh
1 #! /bin/sh
2 # @author: Philippe Coval <mailto:philippe.coval@eurogiciel.fr>
3 # @description: manage git submodules with git-build-package-rpm
4
5 set -x
6 set -e
7
8 cat .gitmodules || return 1
9
10
11 git submodule status | awk '{ print $2 }' | while read dir  ; do
12     name=$(basename "$dir" )
13     echo "name="
14     echo "dir=$dir"
15     git submodule init
16     git submodule update
17
18     tar cjvf "./packaging/${name}.tar.bz2" "${dir}"
19
20     cat<<EOF
21 # Please add "SourceN: $name.tar.bz2" and "%setup -q -a N" to "packaging/*.spec"
22 EOF
23
24 done
25