summaryrefslogtreecommitdiff
path: root/update-includes.sh
blob: 92aafc9c734ebe3c7ed8950c30bead42332ac7a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set +ex

if [ ! "$ANDROID_BUILD_TOP" ]; then
    echo "lunch?"
    exit 1
fi

function update-includes() {
    find -L "$ANDROID_BUILD_TOP/hardware/libhardware/include/hardware" -maxdepth 1 -xtype l -exec rm {} \;

    for f in $ANDROID_BUILD_TOP/hardware/libhardware/include_all/hardware/*; do
        local bn="$(basename $f)"
        ln -s "../../include_all/hardware/$bn" "$ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/$bn"
    done
}

update-includes