blob: e08946b1bdb6a3eca96256284f117a5fac1023f9 [file] [log] [blame]
Jake Whatley4e1248a2016-03-10 21:22:56 -05001#!/bin/bash
2#
3# Copyright (C) 2016 OmniROM Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17echo -e "Enter the AOSP ref to merge"
18read ref
19
20cd ../../../
21
22while read path;
23 do
24
25 project=`echo android_${path} | sed -e 's/\//\_/g'`
26
27 echo ""
28 echo "====================================================================="
29 echo " PROJECT: ${project} -> [ ${path}/ ]"
30 echo ""
31
32 cd $path;
33
34 git merge --abort;
35
36 repo sync -d .
37
38 if git branch | grep "android-6.0-merge" > /dev/null; then
39 git branch -D android-6.0-merge > /dev/null
40 fi
41
42 repo start android-6.0-merge .
43
44 if ! git remote | grep "aosp" > /dev/null; then
45 git remote add aosp https://android.googlesource.com/platform/$path > /dev/null
46 fi
47
48 git fetch aosp
49
50 #echo "====================================================================="
51 #echo " Merging {$ref}"
52 #echo "====================================================================="
53 git merge $ref;
54
55 cd - > /dev/null
56
57done < vendor/omni/utils/omni-list