]> git.karo-electronics.de Git - karo-tx-linux.git/blob - Next/merge
Add linux-next specific files for 20131024
[karo-tx-linux.git] / Next / merge
1 #!/bin/bash
2
3 color=no
4
5 while test $# -gt 0; do
6         case $1 in
7                 --color)
8                         color=yes
9                         shift
10                         ;;
11
12                 *)
13                         shift
14                         ;;
15         esac
16 done
17
18 if test "x$color" = "xyes"; then
19         COLOR_TREE="\033[35m"
20         COLOR_REPOSITORY="\033[33m"
21         COLOR_BRANCH="\033[36m"
22         COLOR_DEFAULT="\033[0m"
23 else
24         COLOR_TREE=
25         COLOR_REPOSITORY=
26         COLOR_BRANCH=
27         COLOR_DEFAULT=
28 fi
29
30 tail -n +5 < Next/Trees | while read tree type url; do
31         repository=${url%#*}
32         branch=${url#*#}
33
34         if test "x$type" != "xgit"; then
35                 echo "Don't know how to handle type $type trees, skipping..."
36                 continue
37         fi
38
39         echo -en "merging tree ${COLOR_TREE}${tree}${COLOR_DEFAULT} "
40         echo -en "from ${COLOR_REPOSITORY}${repository}${COLOR_DEFAULT} "
41         echo -e  "branch ${COLOR_BRANCH}$branch${COLOR_DEFAULT}"
42
43         if ! git merge ${tree}/${branch}; then
44                 /bin/bash <&- < /dev/tty
45         fi
46 done
47
48 echo "-next-$(date +%Y%m%d)" > localversion-next