1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-01 22:05:08 +00:00
freebsd-ports/Tools/portbuild/scripts/doupgrademach

28 lines
508 B
Bash
Executable File

#!/bin/sh
# configurable variables
master=bento
chroot=/a/asami/chroot
kernelconfig=CLUSTER
PATH=/sbin:/usr/sbin:$PATH
if [ -f /usr/src/Makefile ]; then
mv /usr/src /usr/old.src
mv /usr/obj /usr/old.obj
mkdir /usr/src /usr/obj
fi
mount -o -2 $master:$chroot/usr/src /usr/src
mount -o -2 $master:$chroot/usr/obj /usr/obj
echo "installing world"
cd /usr/src && make installworld > /usr/tmp/make.0 2>&1 </dev/null
cd /sys/compile/$kernelconfig && make install
cd /
umount /usr/src /usr/obj
reboot