Delete cache

master
Marko Semet 2020-07-14 01:11:58 +02:00
parent da13c238bc
commit 10a800a072
1 changed files with 2 additions and 8 deletions

View File

@ -15,16 +15,10 @@ printenv &&
# Build
CONFIG_DIR="$(dirname "$0")" &&
flatpak-builder $3 --arch "$2" --install-deps-from=winebarrels --install-deps-only "$BUILD_DIR" "$1" &&
(find '.flatpak-builder/build' -delete || rm -rf ".flatpak-builder/build/*" ".flatpak-builder/build/.*") &&
(find '.flatpak-builder/build' '.flatpak-builder/cache' -delete || rm -rf ".flatpak-builder/build/*" ".flatpak-builder/build/.*" '.flatpak-builder/cache') &&
if [ -z "$4" ]; then
BUILD_DIR= exec flatpak-builder $3 --arch "$2" --sandbox --rebuild-on-sdk-change "$BUILD_DIR" "$1"
else
HASH="$("$CONFIG_DIR/hash_modules.py" --installed "$1" "$2" | sed -n '1p')" || exit 0 &&
if [ -z "$DELETE_CACHE" ]
then
BUILD_DIR= exec flatpak-builder $3 --arch "$2" --sandbox --rebuild-on-sdk-change --repo "$4" -s "WB_HASH='${HASH}'" "$BUILD_DIR" "$1"
else
(find .flatpak-builder/cache -delete || rm -rf .flatpak-builder/cache) &&
BUILD_DIR= flatpak-builder $3 --arch "$2" --sandbox --rebuild-on-sdk-change --repo "$4" -s "WB_HASH='${HASH}'" "$BUILD_DIR" "$1"
fi
exit BUILD_DIR= flatpak-builder $3 --arch "$2" --sandbox --rebuild-on-sdk-change --repo "$4" -s "WB_HASH='${HASH}'" "$BUILD_DIR" "$1"
fi