diff options
Diffstat (limited to 'update_bootloader_files.sh')
-rwxr-xr-x | update_bootloader_files.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh index 6cfdd8b..fb66e7b 100755 --- a/update_bootloader_files.sh +++ b/update_bootloader_files.sh @@ -1,18 +1,21 @@ #!/bin/sh repository=$(grep repository config/settings.cfg | sed s/repository=//) -echo "Fetching bootloader files from $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" # 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` +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 drakiso-bootloader-files RPM in $repository." + echo "ERROR: couldn't find $arch drakiso-bootloader-files RPM in $repository." exit 1 else - echo "Extracting bootloader files from repository." + echo "Extracting $arch bootloader files from repository." rpm2cpio $path | cpio -idm --quiet if [ $? -ne 0 ] ; then echo "ERROR: failed to extract files from archive." |