| version 1.23, 2008/10/11 23:11:58 |
version 1.24, 2008/10/20 23:06:57 |
|
|
| #!/bin/sh |
#!/bin/sh |
| # $RedRiver: release.sh,v 1.22 2008/07/08 22:46:01 andrew Exp $ |
# $RedRiver$ |
| # |
# |
| # Copyright (c) 2002, 2008 Steven Roberts <sroberts@fenderq.com> |
# Copyright (c) 2002, 2008 Steven Roberts <sroberts@fenderq.com> |
| # |
# |
|
|
| # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| # |
# |
| |
|
| TAG=${TAG:=`uname -sr | tr '[:lower:] .' '[:upper:]_'`} |
local _origtag=${TAG} |
| |
TAG=`uname -sr | tr '[:lower:] .' '[:upper:]_'` |
| KERNEL="GENERIC" |
KERNEL="GENERIC" |
| ARCH=`machine` |
ARCH=`machine` |
| DEST="/home/destdir" |
DEST="/home/destdir" |
|
|
| XSRCDIR="/usr/xenocara" |
XSRCDIR="/usr/xenocara" |
| PORTSPATH="/usr/ports" |
PORTSPATH="/usr/ports" |
| |
|
| if [ -e ${HOME}/.releaserc ]; then |
if [ -e /etc/releaserc ]; then |
| . ${HOME}/.releaserc |
. /etc/releaserc |
| fi |
fi |
| |
|
| |
if [ X"" != X"${_origtag}" ]; then |
| |
TAG=$_origtag |
| |
fi |
| |
|
| |
|
| # See http://www.openbsd.org/anoncvs.html for instructions on fetching the |
# See http://www.openbsd.org/anoncvs.html for instructions on fetching the |
| # sources for the first time. |
# sources for the first time. |
| |
|
| update_sources() { |
update_sources() { |
| echo "---------- Update sources ----------" |
echo "---------- Update sources ----------" |
| _cvstag=-r$TAG |
local _d |
| if [ X"$TAG" == X"HEAD" ]; then |
for _d in /usr/src "${XSRCDIR}" "${PORTSPATH}"; do |
| _cvstag="" |
if [ -d $_d ]; then |
| fi |
echo [$_d] cvs update -r $TAG -Pd |
| for d in /usr/src ${XSRCDIR} ${PORTSPATH}; do |
cd $_d && cvs update -r $TAG -Pd |
| echo "cd $d && opencvs update $_cvstag -Pd" |
fi |
| cd $d && opencvs update $_cvstag -Pd |
|
| done |
done |
| } |
} |
| |
|
|
|
| cd /usr/src && nice make obj |
cd /usr/src && nice make obj |
| cd /usr/src/etc && env DESTDIR=/ make distrib-dirs |
cd /usr/src/etc && env DESTDIR=/ make distrib-dirs |
| cd /usr/src && nice make build |
cd /usr/src && nice make build |
| # Update /etc, /var, and /dev/MAKEDEV by hand. |
echo Update /etc, /var, and /dev/MAKEDEV, either by hand or using sysmerge\(8\). |
| } |
} |
| |
|
| make_system_release() { |
make_system_release() { |
|
|
| |
|
| build_xenocara() { |
build_xenocara() { |
| echo "---------- Build and install xenocara ----------" |
echo "---------- Build and install xenocara ----------" |
| rm -rf /usr/xobj/* |
|
| mkdir -p /usr/xobj |
|
| cd $XSRCDIR |
cd $XSRCDIR |
| make bootstrap |
make bootstrap |
| make obj |
make obj |
|
|
| for i in $* |
for i in $* |
| do |
do |
| case $i in |
case $i in |
| full-release) |
|
| build_xenocara |
|
| build_system |
|
| make_xenocara_release |
|
| make_system_release |
|
| ;; |
|
| update) |
update) |
| update_sources |
update_sources |
| ;; |
;; |
|
|
| ;; |
;; |
| xenocara-release) |
xenocara-release) |
| make_xenocara_release |
make_xenocara_release |
| |
;; |
| |
full-release) |
| |
build_system |
| |
build_xenocara |
| |
make_xenocara_release |
| |
make_system_release |
| ;; |
;; |
| *) |
*) |
| echo "---------- Abort! Abort! ----------" |
echo "---------- Abort! Abort! ----------" |