Remove old builds before creating new one

This commit is contained in:
Aleksey Samoilov 2023-03-20 14:31:44 +04:00
parent 17b88563f7
commit deb9dbaddc

View file

@ -30,8 +30,16 @@ version=23.04
YYYYMMDD="$(date +%Y%m%d)"
imagename=ubuntusway-$version-$channel-rpi-$YYYYMMDD
mkdir -p "${basedir}"
cd "${basedir}"
# Remove old builds before creating new one
echo -e "
#----------------------#
# REMOVE OLD BUILDS #
#----------------------#
"
if [ -d $rootdir/artifacts ]; then
rm -rf $rootdir/artifacts
fi
# Bootstrap an ubuntu minimal system
echo -e "
@ -40,6 +48,9 @@ echo -e "
#----------------------#
"
mkdir -p "${basedir}"
cd "${basedir}"
debootstrap \
--arch $architecture \
--components=main,restricted,universe,multiverse \