summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin.whitaker.me.uk>2018-03-11 11:53:03 +0000
committerMartin Whitaker <mageia@martin.whitaker.me.uk>2018-03-11 11:53:03 +0000
commit7d396510dec7b6fb0535cb3b56a4c03b9fbe4d3b (patch)
tree91c0fddf498d70a6f9796ad2c009e1964b85f689
parent320577938fdb5c2b6eeeffc8049ba6d3ea747914 (diff)
downloaddrakclassic-config-7d396510dec7b6fb0535cb3b56a4c03b9fbe4d3b.tar
drakclassic-config-7d396510dec7b6fb0535cb3b56a4c03b9fbe4d3b.tar.gz
drakclassic-config-7d396510dec7b6fb0535cb3b56a4c03b9fbe4d3b.tar.bz2
drakclassic-config-7d396510dec7b6fb0535cb3b56a4c03b9fbe4d3b.tar.xz
drakclassic-config-7d396510dec7b6fb0535cb3b56a4c03b9fbe4d3b.zip
Get both arch's when updating bootloader files.
-rwxr-xr-xbuild_one.sh9
-rwxr-xr-xupdate_bootloader_files.sh35
2 files changed, 18 insertions, 26 deletions
diff --git a/build_one.sh b/build_one.sh
index b819e31..63656e6 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
drakclassic='perl -I ../drakiso/lib ../drakiso/drakclassic'
if [ $# -gt 0 ] ; then
$drakclassic $*
diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh
index aaf381b..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"
+repository=$(grep repository config/settings.cfg | sed s/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