1#!/bin/bash
2
3set +ex
4
5if [ ! "$ANDROID_BUILD_TOP" ]; then
6    echo "lunch?"
7    exit 1
8fi
9
10function update-includes() {
11    find -L "$ANDROID_BUILD_TOP/hardware/libhardware/include/hardware" -maxdepth 1 -xtype l -exec rm {} \;
12
13    for f in $ANDROID_BUILD_TOP/hardware/libhardware/include_all/hardware/*; do
14        local bn="$(basename $f)"
15        ln -s "../../include_all/hardware/$bn" "$ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/$bn"
16    done
17}
18
19update-includes
20