From f47d6bd65f315c5e951b2324110c7e71409eabb3 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 11 Mar 2018 11:54:07 +0000 Subject: Get both arch's when updating bootloader files. --- build_all.sh | 2 +- build_one.sh | 9 +-------- update_bootloader_files.sh | 33 ++++++++++++++++----------------- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/build_all.sh b/build_all.sh index fd271d7..9a7c3f1 100755 --- a/build_all.sh +++ b/build_all.sh @@ -10,8 +10,8 @@ desktops[i586]="Xfce" desktops[x86_64]="GNOME Plasma Xfce" +./update_bootloader_files.sh for arch in $archs; do - ./update_bootloader_files.sh $arch for desktop in ${desktops[$arch]}; do sudo -u draklive sudo /usr/bin/draklive2 --clean --all --define arch=$arch --define desktop=$desktop sudo -u bcd mkdir -p /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD diff --git a/build_one.sh b/build_one.sh index f8ba515..705888f 100755 --- a/build_one.sh +++ b/build_one.sh @@ -1,12 +1,5 @@ #!/bin/sh -arch=$(grep arch config/settings.cfg | sed s/arch=//) -for arg in $*; do - value=${arg#arch=} - if [ $value != $arg ]; then - arch=$value - fi -done -./update_bootloader_files.sh $arch +./update_bootloader_files.sh draklive='perl -I ../drakiso/lib ../drakiso/draklive2' if [ $# -gt 0 ] ; then $draklive $* diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh index fb66e7b..4e7b2e8 100755 --- a/update_bootloader_files.sh +++ b/update_bootloader_files.sh @@ -1,26 +1,25 @@ #!/bin/sh repository=$(grep repository config/settings.cfg | sed s/repository=//) -if [ $# -eq 0 ]; then - arch=$(grep arch config/settings.cfg | sed s/arch=//) -else - arch=$1 -fi -echo "Fetching $arch bootloader files from $repository" +echo "Fetching bootloader files from $repository" # Remove old files rm -rf bootloader +mkdir bootloader -path=`ls -1v $repository/$arch/media/core/{release,updates}/drakiso-bootloader-files*.rpm 2> /dev/null | tail -1` -if [ -z $path ] ; then - echo "ERROR: couldn't find $arch drakiso-bootloader-files RPM in $repository." - exit 1 -else - echo "Extracting $arch bootloader files from repository." - rpm2cpio $path | cpio -idm --quiet - if [ $? -ne 0 ] ; then - echo "ERROR: failed to extract files from archive." +archs="i586 x86_64" +for arch in $archs; do + path=`ls -1v $repository/$arch/media/core/{release,updates}/drakiso-bootloader-files*.rpm 2> /dev/null | tail -1` + if [ -z $path ] ; then + echo "ERROR: couldn't find $arch drakiso-bootloader-files RPM in $repository." exit 1 + else + echo "Extracting $arch bootloader files from repository." + rpm2cpio $path | cpio -idm --quiet + if [ $? -ne 0 ] ; then + echo "ERROR: failed to extract files from archive." + exit 1 + fi fi - mv usr/share/drakiso-bootloader bootloader + cp -ru usr/share/drakiso-bootloader/* bootloader rm -r usr -fi +done -- cgit v1.2.1