Move grub/isolinux stuff to Makefile level
Again, in an attempt to make this feel cleaner, I've moved more out to the makefile level. Not sure I'm happy with that but it works for now Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
142c257323
commit
ee900303ae
1 changed files with 11 additions and 9 deletions
|
@ -182,29 +182,31 @@ command_image () {
|
||||||
if [ "$PKGLIST" = "grub" -o "$PKGLIST" = "grub-gfx" ]; then
|
if [ "$PKGLIST" = "grub" -o "$PKGLIST" = "grub-gfx" ]; then
|
||||||
#test for either (eww, gross)
|
#test for either (eww, gross)
|
||||||
tst=0
|
tst=0
|
||||||
pacman -Qi grub 2>&1 >/dev/null
|
pacman -Qi grub >/dev/null 2>&1
|
||||||
tst=$(($tst + $?))
|
tst=$(($tst + $?))
|
||||||
pacman -Qi grub-gfx 2>&1 >/dev/null
|
pacman -Qi grub-gfx >/dev/null 2>&1
|
||||||
tst=$(($tst + $?))
|
tst=$(($tst + $?))
|
||||||
if [ $tst -ge 2 ]; then
|
if [ $tst -ge 2 ]; then
|
||||||
echo "grub or grub-gfx not found on host system. Cannot install!"
|
echo "grub or grub-gfx not found on host system. Cannot install!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${work_dir}/boot/grub/"
|
if [ ! -e "${work_dir}/boot/grub/stage2_eltorito" ]; then
|
||||||
cp -r /usr/lib/grub/i386-pc/* "${work_dir}/boot/grub"
|
echo "error: grub stage files not found in '${work_dir}/boot/grub"
|
||||||
#TODO remove other grub cruft?
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
bootflags="-b boot/grub/stage2_eltorito"
|
bootflags="-b boot/grub/stage2_eltorito"
|
||||||
elif [ "$PKGLIST" = "isolinux" ]; then
|
elif [ "$PKGLIST" = "isolinux" ]; then
|
||||||
if ! pacman -Qi $PKGLIST 2>&1 >/dev/null; then
|
if ! pacman -Qi $PKGLIST >/dev/null 2>&1; then
|
||||||
echo "$PKGLIST not found on host system. Cannot install!"
|
echo "$PKGLIST not found on host system. Cannot install!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${work_dir}/boot/isolinux"
|
if [ ! -e "${work_dir}/boot/isolinux/isolinux.bin" ]; then
|
||||||
cp /usr/lib/isolinux/* "${work_dir}/boot/isolinux"
|
echo "error: isolinux bin file not found in '${work_dir}/boot/isolinux"
|
||||||
#TODO remove other isolinux cruft?
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
bootflags="-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat"
|
bootflags="-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue