mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
clean: avoid unecessary disk io
This commit is contained in:
parent
5a290a3035
commit
86053a0336
@ -29,19 +29,21 @@ clean_package() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in $BUILD/$1-*; do
|
STAMP=$PKG_BUILD/.libreelec-unpack
|
||||||
if [ -d $i -a -f "$i/.libreelec-unpack" ] ; then
|
|
||||||
. "$i/.libreelec-unpack"
|
if [ -d "$PKG_BUILD" ]; then
|
||||||
|
if [ -f "$STAMP" ] ; then
|
||||||
|
. "$STAMP"
|
||||||
if [ "$STAMP_PKG_NAME" = "$1" ]; then
|
if [ "$STAMP_PKG_NAME" = "$1" ]; then
|
||||||
printf "%${BUILD_INDENT}c ${boldred}*${endcolor} ${red}Removing $i ...${endcolor}\n" ' '>&$SILENT_OUT
|
printf "%${BUILD_INDENT}c ${boldred}*${endcolor} ${red}Removing $PKG_BUILD ...${endcolor}\n" ' '>&$SILENT_OUT
|
||||||
rm -rf $i
|
rm -rf "$PKG_BUILD"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# force clean if no stamp found (previous unpack failed)
|
# force clean if no stamp found (previous unpack failed)
|
||||||
printf "%${BUILD_INDENT}c * Removing $i ...\n" ' '>&$SILENT_OUT
|
printf "%${BUILD_INDENT}c * Removing $PKG_BUILD ...\n" ' '>&$SILENT_OUT
|
||||||
rm -rf $i
|
rm -rf "$PKG_BUILD"
|
||||||
fi
|
fi
|
||||||
done
|
fi
|
||||||
rm -f $STAMPS/$1/build_*
|
rm -f $STAMPS/$1/build_*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user