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