Sadik Armagan | 8f397a1 | 2022-06-17 15:38:22 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # |
| 4 | # Copyright © 2022 ARM Ltd and Contributors. All rights reserved. |
| 5 | # SPDX-License-Identifier: MIT |
| 6 | # |
| 7 | |
| 8 | AOSP_WORKING_DIR=$1 |
| 9 | |
| 10 | if [ "$#" -ne 1 ]; then |
| 11 | |
| 12 | echo "Usage: This script must be passed a single parameter which is a path " |
| 13 | echo " to an existing directory where the AOSP repo's have been cloned." |
| 14 | echo "Error: No working directory path parameter provided." |
| 15 | exit 1 |
| 16 | fi |
| 17 | if [ ! -d "$1" ]; then |
| 18 | |
| 19 | echo "Usage: This script must be passed a single parameter which is a path " |
| 20 | echo " to an existing directory where the AOSP repo's have been cloned." |
| 21 | echo "Error: Working directory path provided is not a directory." |
| 22 | exit 1 |
| 23 | fi |
| 24 | |
| 25 | SCRIPT_PATH=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) |
| 26 | echo "SCRIPT_PATH= ${SCRIPT_PATH}" |
| 27 | |
| 28 | pushd "${AOSP_WORKING_DIR}/system/libbase/" |
| 29 | echo "Applying libbase logging.cpp patch" |
| 30 | git apply "${SCRIPT_PATH}/libbase_logging_cpp.patch" |
| 31 | popd |
| 32 | |
| 33 | pushd "${AOSP_WORKING_DIR}/packages/modules/NeuralNetworks/" |
| 34 | echo "Applying NeuralNetworks patch" |
| 35 | git apply "${SCRIPT_PATH}/NeuralNetworks.patch" |
| 36 | popd |