scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

commit ba1dcc69e001c42c3b29709d572ef07a03667063
parent 8ec7943145bb10e08d0088ca776794629966206c
Author: sin <sin@2f30.org>
Date:   Fri,  4 Apr 2014 14:15:12 +0100

Factor out sections into separate functions

Makes it easy to comment out the relevant calls.

Diffstat:
Mupgrade-obsd | 71+++++++++++++++++++++++++++++++++++++++++------------------------------
1 file changed, 41 insertions(+), 30 deletions(-)

diff --git a/upgrade-obsd b/upgrade-obsd @@ -3,37 +3,48 @@ # You will have to manually ensure that your /usr/src # and/or /usr/xenocara is up to date. -# Build the bsd.sp kernel. -# Ideally we should reboot after this stage -# and build the world with the new kernel. -cd /usr/src/sys/arch/`uname -m`/conf -config GENERIC -cd ../compile/GENERIC -make clean -make -make install -# In case we need to do any modifications -# config -ef /bsd +kernel() { + # Build the bsd.sp kernel. + # Ideally we should reboot after this stage + # and build the world with the new kernel. + cd /usr/src/sys/arch/`uname -m`/conf + config GENERIC + cd ../compile/GENERIC + make clean + make + make install + # config -ef /bsd +} -# Build the world -cd /usr/src -rm -rf /usr/obj/* -make clean -make obj -cd /usr/src/etc && env DESTDIR=/ make distrib-dirs -cd /usr/src -make build +world() { + # Build the world + cd /usr/src + rm -rf /usr/obj/* + make clean + make obj + cd /usr/src/etc && env DESTDIR=/ make distrib-dirs + cd /usr/src + make build +} -# Build xenocara -cd /usr/xenocara -rm -rf /usr/xobj/* -make bootstrap -make obj -make build +xenocara() { + # Build xenocara + cd /usr/xenocara + rm -rf /usr/xobj/* + make bootstrap + make obj + make build +} -# Make device nodes -cd /dev -cp /usr/src/etc/etc.`machine`/MAKEDEV ./ -./MAKEDEV all +finish() { + # Make device nodes + cd /dev + cp /usr/src/etc/etc.`machine`/MAKEDEV ./ + ./MAKEDEV all + sysmerge -s /usr/src +} -sysmerge -s /usr/src +kernel +world +xenocara +finish