scripts/image: use helper function

This commit is contained in:
MilhouseVH 2018-02-01 05:21:36 +00:00
parent ed0b6da9b1
commit 964e1c3755

View File

@ -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