From d036c394f27935281caefdae0ce2768f9b2c602d Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 4 Mar 2016 22:30:36 +0100 Subject: [PATCH] scripts/image: fix build after https://github.com/OpenELEC/OpenELEC.tv/commit/692b086ad0a8f3038b235646bfafd49423e6dd02 Signed-off-by: Stephan Raue --- scripts/image | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/image b/scripts/image index e331efc9f2..a8d5eff183 100755 --- a/scripts/image +++ b/scripts/image @@ -254,18 +254,23 @@ fi # remove n previous created release image rm -rf $TARGET_IMG/$IMAGE_NAME.img.gz if [ -n "$BOOTLOADER" ]; then - if [ -n "`find $HOME/.openelec/projects/$PROJECT/packages -type d -name $BOOTLOADER 2>/dev/null`" ]; then + + BOOTLOADER_DIR="" + + if [ -z "$BOOTLOADER_DIR" -a -d $HOME/.openelec/projects/$PROJECT/packages ]; then BOOTLOADER_DIR=`find $HOME/.openelec/projects/$PROJECT/packages -type d -name $BOOTLOADER 2>/dev/null` - elif [ -n "`find $HOME/.openelec/packages -type d -name $BOOTLOADER 2>/dev/null`" ]; then + fi + + if [ -z "$BOOTLOADER_DIR" -a -d $HOME/.openelec/packages ]; then BOOTLOADER_DIR=`find $HOME/.openelec/packages -type d -name $BOOTLOADER 2>/dev/null` - elif [ -n "`find $PROJECT_DIR/$PROJECT/packages -type d -name $BOOTLOADER`" ]; then + fi + + if [ -z "$BOOTLOADER_DIR" -a -d $PROJECT_DIR/$PROJECT/packages ]; then BOOTLOADER_DIR=`find $PROJECT_DIR/$PROJECT/packages -type d -name $BOOTLOADER 2>/dev/null` - else - BOOTLOADER_DIR="" fi if [ -z "$BOOTLOADER_DIR" -o ! -d "$BOOTLOADER_DIR" ]; then - BOOTLOADER_DIR=`find $PACKAGES -type d -name $BOOTLOADER 2>/dev/null` + BOOTLOADER_DIR=`find $PACKAGES -type d -name $BOOTLOADER 2>/dev/null` fi if [ -d "$BOOTLOADER_DIR"/files ]; then