summaryrefslogtreecommitdiff
path: root/lkft-mainline-db845c
blob: 6d18f9d0fef2ff48ee41b3072e87f798b695b71a (plain)
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
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash

. $(dirname $0)/functions

PATCHES=0
if [ -n "$1" ]; then
        AOSP="$1"
else
        AOSP="`pwd`"
fi

if ! [ -d "$AOSP" ] && ! [ -d "$AOSP/bionic" ] && [ -d "$AOSP"/build ]; then
        echo "This script must be run from the AOSP source directory"
        echo "or with the AOSP source directory as its first parameter."
        exit 1
fi

function apply_amit_mainline_patch(){
    local commit_id=$1 && shift
    local target_dir="kernel/common/mainline"
    if [ -n "$1" ]; then
        target_dir=$1 && shift
    fi
    if [ -d ${target_dir} ]; then
        curl_am https://git.linaro.org/people/amit.pundir/linux.git/patch/?id=${commit_id} ${target_dir}
    fi
}

function apply_jstultz_mainline_patch(){
    local commit_id=$1 && shift
    local target_dir="kernel/common/mainline"
    if [ -n "$1" ]; then
        target_dir=$1 && shift
    fi
    if [ -d ${target_dir} ]; then
        curl_am https://git.linaro.org/people/john.stultz/android-dev.git/patch/?id=${commit_id} ${target_dir}
    fi
}

function apply_patchwork(){
    local patch_id=$1 && shift
    local target_dir="common"
    if [ -n "$1" ]; then
        target_dir=$1 && shift
    fi
    if [ -d ${target_dir} ]; then
        curl_am https://lore.kernel.org/patchwork/patch/${patch_id}/mbox/ ${target_dir}
    fi
}
##################################################
################ Linaro hack   ###################
##################################################