Fix to use number version instead of codename to the image file name

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I1af52b44b56ea27a8d72551863344542a9a814e1
This commit is contained in:
Dongjin Kim
2020-04-22 22:30:18 +09:00
parent 6ad0c993ca
commit 14ef483448
2 changed files with 16 additions and 1 deletions

View File

@@ -197,6 +197,7 @@ do_preinstall() {
-e "s,@@DEFAULT_ROOT_PASSWD@@,$(default_root_passwd),g" \
-e "s,@@DEFAULT_USER@@,$(default_user),g" \
-e "s,@@DEFAULT_USER_PASSWD@@,$(default_user_passwd),g" \
-e "s,@@DEFAULT_DISTRO@@,${DISTRO},g" \
${fixup}
done

16
menu
View File

@@ -109,9 +109,23 @@ do_menu_default_user_passwd() {
${DEFAULT_PASSWD} 2>&1 >/dev/tty)
}
distro_version() {
case $1 in
bionic)
echo "18.04"
;;
disco)
echo "19.04"
;;
focal)
echo "20.04"
;;
esac
}
do_menu() {
while true; do
IMAGE_FILE=ubuntu-${DISTRO}-${FLAVOUR}-${BOARD}-`date +%Y%m%d`
IMAGE_FILE=ubuntu-$(distro_version ${DISTRO})-${FLAVOUR}-${BOARD}-`date +%Y%m%d`
CHOICE=$(dialog --clear --backtitle "ODROID-STAMPER" \
--title "Custom Ubuntu Recipe" \
--extra-button --extra-label "Done" \