From 964e1c375592ef770bc654a8e8434f085ee473b6 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 1 Feb 2018 05:21:36 +0000 Subject: [PATCH] scripts/image: use helper function --- scripts/image | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/image b/scripts/image index 290bd92ef3..550d6fb8a8 100755 --- a/scripts/image +++ b/scripts/image @@ -283,15 +283,9 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ] cp -R $BOOTLOADER_DIR/files/* $RELEASE_DIR fi - if [ -f $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release ]; then - echo "Running $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release" - . $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader/release - elif [ -f $PROJECT_DIR/$PROJECT/bootloader/release ]; then - echo "Running $PROJECT_DIR/$PROJECT/bootloader/release" - . $PROJECT_DIR/$PROJECT/bootloader/release - elif [ -f $BOOTLOADER_DIR/release ]; then - echo "Running $BOOTLOADER_DIR/release" - . $BOOTLOADER_DIR/release + if find_file_path bootloader/release $BOOTLOADER_DIR/release; then + echo "Running $FOUND_PATH" + . $FOUND_PATH fi fi