-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpkg-git-merge-ubuntu
executable file
·41 lines (32 loc) · 1.07 KB
/
pkg-git-merge-ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
#
# Merges a repo into a core package to sponsor a contribution.
#
# Examples: pkg-git-merge-ubuntu barbican https://git.launchpad.net/~chris.macnaughton/+git/barbican master
# pkg-git-merge-ubuntu barbican https://git.launchpad.net/~chris.macnaughton/+git/barbican stable/liberty
#
set -ex
if [ $# -ne 3 ]
then
echo "Usage: $0 package-name sponsoree-repo branch"
echo " $0 barbican git://git.launchpad.net/~chris.macnaughton/ubuntu/+source/barbican master"
echo " $0 barbican git://git.launchpad.net/~chris.macnaughton/ubuntu/+source/barbican stable/train"
exit
fi
package=$1
repo=$2
branch=$3
git clone lp:~ubuntu-openstack-dev/ubuntu/+source/$package || \
git clone lp:~ubuntu-server-dev/ubuntu/+source/$package
cd $package
git checkout pristine-tar
git checkout upstream
git checkout $branch
git remote add sponsoree $repo
git fetch sponsoree
git checkout upstream
git merge --ff-only sponsoree/upstream
git checkout pristine-tar
git merge --ff-only sponsoree/pristine-tar
git checkout $branch
git merge --ff-only sponsoree/$branch