summaryrefslogtreecommitdiffstats
path: root/update_bootloader_files.sh
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin.whitaker.me.uk>2017-12-23 20:19:25 +0000
committerMartin Whitaker <mageia@martin.whitaker.me.uk>2017-12-24 21:56:13 +0000
commitd008f6b961401933b15c95090b95460c22d530fb (patch)
treeeda1ed4d1106bbdc9862f9f6b12e01813d3115d1 /update_bootloader_files.sh
downloaddrakclassic-config-d008f6b961401933b15c95090b95460c22d530fb.tar
drakclassic-config-d008f6b961401933b15c95090b95460c22d530fb.tar.gz
drakclassic-config-d008f6b961401933b15c95090b95460c22d530fb.tar.bz2
drakclassic-config-d008f6b961401933b15c95090b95460c22d530fb.tar.xz
drakclassic-config-d008f6b961401933b15c95090b95460c22d530fb.zip
Initial config for building classic installer ISOs using drakclassic.
Diffstat (limited to 'update_bootloader_files.sh')
-rwxr-xr-xupdate_bootloader_files.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh
new file mode 100755
index 0000000..b3d7ff6
--- /dev/null
+++ b/update_bootloader_files.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+repository=$(grep repository config/settings.cfg | sed s/repository=//)
+
+# Remove old files
+rm -rf bootloader
+
+# The 64-bit packge contains everything we need. The non-UEFI grub2 images
+# are built for i386, and everything else should be architecture-independent
+path=`ls -1v $repository/x86_64/media/core/{release,updates}/drakiso-bootloader-files*.rpm 2> /dev/null | tail -1`
+if [ -z $path ] ; then
+ echo "ERROR: couldn't find drakiso-bootloader-files RPM in $repository"
+ exit 1
+else
+ echo "Extracting bootloader files from $repository"
+ rpm2cpio $path | cpio -idm
+ if [ $? -ne 0 ] ; then
+ echo "ERROR: failed to extract files from archive"
+ exit 1
+ fi
+ mv usr/share/drakiso-bootloader bootloader
+ rm -r usr
+fi