build: auto remove build dirs

This commit is contained in:
MilhouseVH
2020-01-30 04:49:29 +00:00
committed by Andre Heider
parent 5a57640b89
commit a11e063083
6 changed files with 161 additions and 14 deletions

12
scripts/autoremove Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
. config/options "${1}"
if [ -d "${PKG_BUILD}" -a "${PKG_SECTION}" != "virtual" ]; then
print_color CLR_AUTOREMOVE "AUTOREMOVE ${PKG_BUILD}"
echo
rm -r "${PKG_BUILD}"
fi