scripts

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

commit bdfbe09389426ff273a10e38900b3d39b254929e
parent 7315744690c993f813403d50958c364fb9c640b8
Author: sin <sin@2f30.org>
Date:   Mon Nov 21 13:52:23 +0000

Rename upgrade-obsd to sysbuild

Diffstat:
sysbuild | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
upgrade-obsd | 59-----------------------------------------------------------
2 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/sysbuild b/sysbuild @@ -0,0 +1,59 @@ +#!/bin/sh -e + +finalize=0 + +upgradekernel() { + rm -rf /usr/obj/* + cd /usr/src/sys/arch/`machine`/compile/GENERIC.MP + make obj + make config + make + make install + chmod 644 /bsd +} + +upgradeworld() { + rm -rf /usr/obj/* + cd /usr/src + make obj + make build + finalize=1 +} + +upgradexenocara() { + rm -rf /usr/xobj/* + cd /usr/xenocara + make bootstrap + make obj + make build + finalize=1 +} + +finish() { + cd /dev + cp /usr/src/etc/etc.`machine`/MAKEDEV ./ + ./MAKEDEV all + sysmerge + fw_update +} + +usage() { +cat << EOF +usage: upgrade-obsd [k] [w] [x] +k Upgrade kernel +w Upgrade world +x Upgrade xenocara +EOF +exit 1 +} + +for arg in "$@"; do + case "$arg" in + k) upgradekernel ;; + w) upgradeworld ;; + x) upgradexenocara ;; + *) usage ;; + esac +done + +test "$finalize" -eq 1 && finish diff --git a/upgrade-obsd b/upgrade-obsd @@ -1,59 +0,0 @@ -#!/bin/sh -e - -finalize=0 - -upgradekernel() { - rm -rf /usr/obj/* - cd /usr/src/sys/arch/`machine`/compile/GENERIC.MP - make obj - make config - make - make install - chmod 644 /bsd -} - -upgradeworld() { - rm -rf /usr/obj/* - cd /usr/src - make obj - make build - finalize=1 -} - -upgradexenocara() { - rm -rf /usr/xobj/* - cd /usr/xenocara - make bootstrap - make obj - make build - finalize=1 -} - -finish() { - cd /dev - cp /usr/src/etc/etc.`machine`/MAKEDEV ./ - ./MAKEDEV all - sysmerge - fw_update -} - -usage() { -cat << EOF -usage: upgrade-obsd [k] [w] [x] -k Upgrade kernel -w Upgrade world -x Upgrade xenocara -EOF -exit 1 -} - -for arg in "$@"; do - case "$arg" in - k) upgradekernel ;; - w) upgradeworld ;; - x) upgradexenocara ;; - *) usage ;; - esac -done - -test "$finalize" -eq 1 && finish