From ad74006fb22ddab8d9d8231ba54952543bd0f43e Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Mon, 22 Oct 2018 23:23:47 +0800 Subject: source distroinfo before process_distro --- buildlive | 4 ++++ functions.sh | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/buildlive b/buildlive index 3de3b03..3440592 100755 --- a/buildlive +++ b/buildlive @@ -156,6 +156,10 @@ do ISOFILE="${ISOLIST[$i-1]}" ISONAME="${ISONAMELIST[$i-1]}" DISTRO="${DISTROLIST[$i-1]}" + + set_distro "$DISTRO" + export DISTRONAME KEYWORD # for grub and syslinux generation + process_distro "$DISTRO" if [ "$GRUBCFG_ONLY" == 0 ]; then diff --git a/functions.sh b/functions.sh index d888941..158be0b 100644 --- a/functions.sh +++ b/functions.sh @@ -25,12 +25,16 @@ checksum_verify() { fi } +set_distro() { + _distrobase="distro/$(cut -d'/' -f1 <<< "$1")" + source "$_distrobase/distroinfo" +} + # process_isoinfo # loads $DISTRONAME $ISONAME $ISOFILE $ISOURL process_isoinfo() { unset MD5 SHA1 SHA256 SHA512 - _distrobase="distro/$(cut -d'/' -f1 <<< "$1")" - source "$_distrobase/distroinfo" + set_distro "$1" source "distro/$1/isoinfo" ISOFILE="$(basename $ISOURL)" } -- cgit v1.2.3