summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin.whitaker.me.uk>2020-05-31 20:25:11 +0100
committerMartin Whitaker <mageia@martin.whitaker.me.uk>2020-05-31 20:25:11 +0100
commitafa4e8c71fd47e624acdebfd900f1b28e2f516da (patch)
tree772d5e509494bf01458240a03971a6676c1e77f2
parentd2b65994d63e01aead3dd6e1cabbe760902f8e66 (diff)
downloaddrakclassic-config-afa4e8c71fd47e624acdebfd900f1b28e2f516da.tar
drakclassic-config-afa4e8c71fd47e624acdebfd900f1b28e2f516da.tar.gz
drakclassic-config-afa4e8c71fd47e624acdebfd900f1b28e2f516da.tar.bz2
drakclassic-config-afa4e8c71fd47e624acdebfd900f1b28e2f516da.tar.xz
drakclassic-config-afa4e8c71fd47e624acdebfd900f1b28e2f516da.zip
Update build scripts to unpack pcmemtest binaries inrepository.
-rwxr-xr-xbuild_all.sh1
-rwxr-xr-xbuild_one.sh1
-rwxr-xr-xupdate_pcmemtest_files.sh25
3 files changed, 27 insertions, 0 deletions
diff --git a/build_all.sh b/build_all.sh
index d95287d..a14ec26 100755
--- a/build_all.sh
+++ b/build_all.sh
@@ -12,6 +12,7 @@ case $(hostname) in
esac
./update_bootloader_files.sh
+./update_pcmemtest_files.sh
for arch in $archs; do
isoname=$distro-$release-$arch
$sudo drakclassic --clean --all --define arch=$arch
diff --git a/build_one.sh b/build_one.sh
index 4454ed6..079e9ba 100755
--- a/build_one.sh
+++ b/build_one.sh
@@ -5,6 +5,7 @@ case $(hostname) in
esac
./update_bootloader_files.sh
+./update_pcmemtest_files.sh
if [ $# -gt 0 ] ; then
$sudo drakclassic $*
else
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