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