minix/boot/updateboot.sh
Ben Gras 455b809b17 made boot/ into hierarchy of programs
work of Antoine Leca
2011-04-28 01:33:23 +02:00

28 lines
457 B
Bash
Executable file

#!/bin/sh
set -e
MDEC=/usr/mdec
BOOT=/boot/boot
ROOT=`printroot -r`
if [ ! -b "$ROOT" ]
then echo root device $ROOT not found
exit 1
fi
echo -n "Install boot as $BOOT on current root and patch into $ROOT? (y/N) "
read ans
if [ ! "$ans" = y ]
then echo Aborting.
exit 1
fi
make install || true
echo Installing boot monitor into $BOOT.
cp $MDEC/boot $BOOT
echo Patching position of $BOOT into $ROOT.
installboot -d "$ROOT" $MDEC/bootblock $BOOT
sync