From 66f04b049c33a13173ad72bedc06fac46f046990 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 30 May 2020 20:12:22 +0100 Subject: Update build scripts to unpack pcmemtest binaries inrepository. --- update_pcmemtest_files.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 update_pcmemtest_files.sh (limited to 'update_pcmemtest_files.sh') diff --git a/update_pcmemtest_files.sh b/update_pcmemtest_files.sh new file mode 100755 index 0000000..6ebc987 --- /dev/null +++ b/update_pcmemtest_files.sh @@ -0,0 +1,25 @@ +#!/bin/sh +repository=$(grep repository config/settings.cfg | sed s/repository=//) +echo "Unpacking pcmemtest file in $repository" + +case $(hostname) in + *.mageia.org) sudo="sudo -u bcd";; +esac + +archs="i586 x86_64" +for arch in $archs; do + path=`ls -1v $repository/$arch/media/core/{release,updates}/pcmemtest*.rpm 2> /dev/null | tail -1` + if [ -z $path ] ; then + echo "ERROR: couldn't find $arch pcmemtest RPM in $repository." + exit 1 + else + echo "Unpacking $arch pcmemtest file in repository." + rpm2cpio $path | cpio -idm --quiet + if [ $? -ne 0 ] ; then + echo "ERROR: failed to extract files from archive." + exit 1 + fi + fi + $sudo cp -u boot/pcmemtest $repository/$arch/isolinux/pcmemtest + rm -r boot etc usr +done -- cgit v1.2.1