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