a0b00e5771d894d0da00ae2a6f0390f5071037da
[platform/upstream/docker-engine.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 git submodule status | awk '{ print $2 }' | while read dir  ; do
11     name=$(basename "$dir" )
12     echo "name="
13     echo "dir=$dir"
14     git submodule init
15     git submodule update
16
17     tar cjvf "./packaging/${name}.tar.bz2" "${dir}"
18
19 cat<<EOF
20 # Please add "SourceN: $name.tar.bz2" and "%setup -q -a N" to "packaging/*.spec"
21 EOF
22
23 done