build: clean cache by default

This commit is contained in:
nachoparker 2018-06-27 21:15:15 +02:00
parent fbc0d465e9
commit 16227491a7
5 changed files with 12 additions and 6 deletions

View File

@ -21,7 +21,7 @@ source buildlib.sh # initializes $IMGNAME
}
# Raspbian
CLEAN=1 ./build-SD-rpi.sh "$IP"
./build-SD-rpi.sh "$IP"
#./build-SD-berryboot.sh "$IMG" #TODO
# Armbian

View File

@ -8,7 +8,7 @@
# Usage: ./build-SD-armbian.sh <board_code> [<board_name>]
#
#CLEAN=1 # Pass this envvar to clean download cache
#CLEAN=0 # Pass this envvar to avoid cleaning download cache
BOARD="$1"
BNAME="${2:-$1}"
@ -39,9 +39,13 @@ KERNEL_ONLY=no
KERNEL_CONFIGURE=no
BUILD_DESKTOP=no
USE_CCACHE=yes
# CLEAN_LEVEL="" # study this: it is much faster, but generated images might be broken (#548)
# NO_APT_CACHER=no # this will also improve build times, but doesn't seem very reliable
EOF
[[ "$CLEAN" == "0" ]] && {
cat >> armbian/config-docker-guest.conf <<EOF
CLEAN_LEVEL="" # study this: it is much faster, but generated images might be broken (#548)
# NO_APT_CACHER=no # this will also improve build times, but doesn't seem very reliable
EOF
}
# board specific parameters
CONF="config-$BOARD".conf
@ -49,6 +53,7 @@ CONF="config-$BOARD".conf
# build
armbian/compile.sh docker
rm armbian/config-docker-guest.conf
# pack image
mv armbian/output/images/Armbian*.img "$IMG"

View File

@ -13,7 +13,7 @@ source buildlib.sh
IP=${1:-192.168.0.145} # For QEMU automated testing (optional)
SIZE=3G # Raspbian image size
#CLEAN=1 # Pass this envvar to clean download cache
#CLEAN=0 # Pass this envvar to skip cleaning download cache
IMG="NextCloudPi_RPi_$( date "+%m-%d-%y" ).img"
##############################################################################

View File

@ -118,7 +118,7 @@ $CFG_STEP
function prepare_dirs()
{
[[ "$CLEAN" != "" ]] && rm -rf cache
[[ "$CLEAN" == "0" ]] || rm -rf cache
rm -rf tmp
mkdir -p tmp output cache
}

View File

@ -103,6 +103,7 @@ configure()
cleanup()
{
# this uninstalls udiskie, commented out
# udiskie with these dependencies fixed in Buster
# apt-get purge -y make gcc libc-dev
:
}