mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
unpack: avoid calculating hash more than once
This commit is contained in:
parent
b1c2191a20
commit
4bfb206432
@ -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"
|
[ -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
|
# Perform a wildcard match on the package to ensure old versions are cleaned too
|
||||||
|
PKG_DEEPMD5=
|
||||||
for i in $BUILD/$1-*; do
|
for i in $BUILD/$1-*; do
|
||||||
if [ -d $i -a -f "$i/.libreelec-unpack" ] ; then
|
if [ -d $i -a -f "$i/.libreelec-unpack" ] ; then
|
||||||
. "$i/.libreelec-unpack"
|
. "$i/.libreelec-unpack"
|
||||||
if [ "$STAMP_PKG_NAME" = "$1" ]; then
|
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
|
if [ ! "$PKG_DEEPMD5" = "$STAMP_PKG_DEEPMD5" ] ; then
|
||||||
$SCRIPTS/clean $1
|
$SCRIPTS/clean $1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user