blob: 87d120fbefc9f95ac28a89ac1707fdacc3c5b7e6 [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
Humberto Borba7ea79de2016-12-07 20:19:29 -020020branch_name=${ref}"-merge"
21# echo $branch_name
22
Jake Whatley4e1248a2016-03-10 21:22:56 -050023cd ../../../
24
25while read path;
26 do
27
28 project=`echo android_${path} | sed -e 's/\//\_/g'`
29
30 echo ""
31 echo "====================================================================="
32 echo " PROJECT: ${project} -> [ ${path}/ ]"
33 echo ""
34
35 cd $path;
36
37 git merge --abort;
38
39 repo sync -d .
40
Humberto Borba7ea79de2016-12-07 20:19:29 -020041 if git branch | grep ${branch_name} > /dev/null; then
42 git branch -D ${branch_name} > /dev/null
Jake Whatley4e1248a2016-03-10 21:22:56 -050043 fi
44
Humberto Borba7ea79de2016-12-07 20:19:29 -020045 repo start ${branch_name} .
Jake Whatley4e1248a2016-03-10 21:22:56 -050046
47 if ! git remote | grep "aosp" > /dev/null; then
48 git remote add aosp https://android.googlesource.com/platform/$path > /dev/null
49 fi
50
darkobas3def7e02016-07-07 15:18:40 +020051 git fetch --tags aosp
Jake Whatley4e1248a2016-03-10 21:22:56 -050052
53 #echo "====================================================================="
54 #echo " Merging {$ref}"
55 #echo "====================================================================="
56 git merge $ref;
57
58 cd - > /dev/null
59
Humberto Borba87dbab22016-07-28 19:05:13 -030060done < vendor/omni/utils/aosp-forked-list