xref: /OK3568_Linux_fs/device/rockchip/common/data/apply-all.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/bash -e
2
3[ -z "$DEBUG" ] || set -x
4
5PATCH_DIR="$(dirname "$(realpath "$0")")"
6
7SDK_DIR="$(realpath "${1:-"${SDK_DIR:-"$PATCH_DIR/../../../../../"}"}")"
8
9echo "Applying all patches from $PATCH_DIR to $SDK_DIR"
10
11cd "$PATCH_DIR"
12for s in $(find . -name apply-patches.sh); do
13	DIR="$(realpath "$SDK_DIR/$(dirname $s)")"
14	echo "Applying patches to $DIR"
15	cd "$DIR" && "$PATCH_DIR/$s"
16	echo "Done"
17done
18