blob: 330ae32220993319a5ffb20c5d5067b71ed5fa86 [file] [log] [blame]
Devin Moore32ca32b2023-01-12 19:28:46 +00001#!/bin/bash
2
3if [[ $# -ne 1 ]]; then
4 echo "Usage: $0 INTERFACE_NAME"
5 echo "- INTERFACE_NAME fully qualified HIDL interface name with version"
6 echo "example of creating the diffs for android.hardware.boot@1.2"
7 echo "$ ./anapic_hidl2aidl_review.sh android.hardware.boot@1.2"
8 exit 1
9fi
10
11# for pathmod
12source ${ANDROID_BUILD_TOP}/build/make/envsetup.sh
13
14set -ex
15type hidl2aidl 2>/dev/null || m hidl2aidl
16
17INTERFACE_NAME_NO_VER=${1%@*}
18pushd $(pathmod $INTERFACE_NAME_NO_VER)
19rm -rf android
20hidl2aidl -o . "$1"
21rm -rf conversion.log translate include
22git add -A
23git commit -am "convert $1" --no-edit
24git revert HEAD --no-edit
25git commit --amend --no-edit
26repo upload . --no-verify
27popd