summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-03-11 11:54:07 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-03-11 11:54:07 +0000
commitf47d6bd65f315c5e951b2324110c7e71409eabb3 (patch)
tree21a62c095c2181f61a8bdce9998f944f9112506b
parent11dc6c20bc6c2f650eff0fd7654f674376e3ee50 (diff)
downloaddraklive-config-f47d6bd65f315c5e951b2324110c7e71409eabb3.tar
draklive-config-f47d6bd65f315c5e951b2324110c7e71409eabb3.tar.gz
draklive-config-f47d6bd65f315c5e951b2324110c7e71409eabb3.tar.bz2
draklive-config-f47d6bd65f315c5e951b2324110c7e71409eabb3.tar.xz
draklive-config-f47d6bd65f315c5e951b2324110c7e71409eabb3.zip
Get both arch's when updating bootloader files.
-rwxr-xr-xbuild_all.sh2
-rwxr-xr-xbuild_one.sh9
-rwxr-xr-xupdate_bootloader_files.sh33
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