diff --git a/scripts/unpack b/scripts/unpack index 9d16daeac4..a1fae1e211 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -40,11 +40,12 @@ STAMP_DEPENDS="$PKG_DIR $PKG_NEED_UNPACK $PROJECT_DIR/$PROJECT/patches/$PKG_NAME [ -n "$DEVICE" ] && STAMP_DEPENDS="$STAMP_DEPENDS $PROJECT_DIR/$PROJECT/devices/$DEVICE/patches/$PKG_NAME" # Perform a wildcard match on the package to ensure old versions are cleaned too +PKG_DEEPMD5= for i in $BUILD/$1-*; do if [ -d $i -a -f "$i/.libreelec-unpack" ] ; then . "$i/.libreelec-unpack" if [ "$STAMP_PKG_NAME" = "$1" ]; then - PKG_DEEPMD5=$(find $STAMP_DEPENDS -exec md5sum {} \; 2>/dev/null | sort | md5sum | cut -d" " -f1) + [ -z "${PKG_DEEPMD5}" ] && PKG_DEEPMD5=$(find $STAMP_DEPENDS -exec md5sum {} \; 2>/dev/null | sort | md5sum | cut -d" " -f1) if [ ! "$PKG_DEEPMD5" = "$STAMP_PKG_DEEPMD5" ] ; then $SCRIPTS/clean $1 fi