From 24df95eb842bd50243979b878235afea6001d7ed Mon Sep 17 00:00:00 2001 From: r0m30 Date: Mon, 9 Feb 2015 13:47:07 -0800 Subject: [PATCH] Add minor checking to image build scripts --- images/buildbiospba | 8 ++++++++ images/buildrescue | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/images/buildbiospba b/images/buildbiospba index 626ae890..379b8391 100755 --- a/images/buildbiospba +++ b/images/buildbiospba @@ -3,11 +3,19 @@ set -x # Build the bios PBA ## define releases for tools . conf + VERSIONINFO=`git describe --dirty` BUILDTYPE=biospba BUILDIMG=${BUILDTYPE}-${VERSIONINFO}.img # Start fresh sudo rm -rf ${BUILDTYPE} ; mkdir ${BUILDTYPE} ; cd ${BUILDTYPE} +## check that everything is available +[ -f ${SYSLINUX}/bios/mbr/mbr.bin -a \ + -x ${SYSLINUX}/bios/linux/syslinux -a \ + -f ${SYSLINUX}/bios/com32/msedpba/msedpba.c32 -a \ + -f ${SYSLINUX}/bios/com32/libutil/libutil.c32 -a \ + -f ${SYSLINUX}/bios/com32/lib/libcom32.c32 \ + ] || { echo " prereqs are not available "; exit 1; } # dd if=/dev/zero of=${BUILDIMG} bs=1M count=1 (echo o;echo n;echo p;echo 1;echo 63;echo "";echo a;echo 1;echo t;echo b;echo w) | fdisk -C 10 ${BUILDIMG} diff --git a/images/buildrescue b/images/buildrescue index 2ac55d36..c09b5b98 100755 --- a/images/buildrescue +++ b/images/buildrescue @@ -9,6 +9,13 @@ BUILDIMG=${BUILDTYPE}-${VERSIONINFO}.img echo "Building " $BUILDTYPE "image" # Start fresh sudo rm -rf ${BUILDTYPE} ; mkdir ${BUILDTYPE} ; cd ${BUILDTYPE} +[ -f ${SYSLINUX}/bios/mbr/mbr.bin -a \ + -x ${SYSLINUX}/bios/extlinux/extlinux -a \ + -f ../scratch/core.gz -a \ + -f ../scratch/vmlinuz -a \ + -f ../scratch/hdparm.tcz -a \ + -f ../../dist/Release_i686/msed \ + ] || { echo " prereqs are not available "; exit 1; } # dd if=/dev/zero of=${BUILDIMG} bs=1M count=15 (echo o;echo n;echo p;echo 1;echo "";echo "";echo a;echo 1;echo w) | fdisk -C 100 ${BUILDIMG}