diff options
-rw-r--r-- | functions | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -10,6 +10,7 @@ apply() { local REPO local DIR local SERVER + local LOCAL_DIR if [ "$1" = "--linaro" ]; then SERVER="git://review.android.git.linaro.org/" shift @@ -21,14 +22,24 @@ apply() { SERVER="https://android.googlesource.com/" fi - if echo "$1" |grep -q '^device/'; then + # Make specifying local path possible + if [ "$1" = "--local" ]; then + shift + LOCAL_DIR="$1" + shift + else + LOCAL_DIR="$1" + fi + + # device and kernel have different path on repo to projects under platform + if echo "$1" |grep -q -e '^device/' -e '^kernel/'; then REPO="$1" else REPO="platform/$1" fi DIR=`echo $2 |cut -d/ -f1 |rev |cut -b1-2 |rev` - cd "$AOSP"/"$1" + cd "$AOSP"/"${LOCAL_DIR}" echo "=== Applying $2 ===" if ! git fetch "$SERVER$REPO" refs/changes/$DIR/"$2"; then echo "Failed to fetch $2, typo in script?" |