| version 1.32, 2010/02/24 21:58:18 |
version 1.36, 2014/11/27 21:17:46 |
|
|
| #!/bin/sh |
#!/bin/sh |
| # $AFresh1: release.sh,v 1.31 2010/02/10 20:57:07 andrew Exp $ |
# $AFresh1: release.sh,v 1.35 2014/11/08 20:32:55 andrew Exp $ |
| # |
# |
| # Copyright (c) 2002, 2008 Steven Roberts <sroberts@fenderq.com> |
# Copyright (c) 2002, 2008 Steven Roberts <sroberts@fenderq.com> |
| # |
# |
|
|
| echo "---------- Update sources ----------" |
echo "---------- Update sources ----------" |
| local _d |
local _d |
| for _d in /usr/src "${XSRCDIR}" "${PORTSPATH}"; do |
for _d in /usr/src "${XSRCDIR}" "${PORTSPATH}"; do |
| if [ -d $_d ]; then |
if [ -d $_d -a -e $_d/CVS ]; then |
| echo [$_d] cvs update -r$TAG -Pd |
R="-r$TAG" |
| cd $_d && cvs update -r$TAG -Pd || exit 255 |
[ "$TAG" = "HEAD" ] && R="-A" |
| |
echo [$_d] cvs update $R -Pd |
| |
cd $_d && cvs update $R -Pd || exit 255 |
| fi |
fi |
| done |
done |
| } |
} |
|
|
| |
|
| make_system_release() { |
make_system_release() { |
| echo "---------- Make and validate the system release ----------" |
echo "---------- Make and validate the system release ----------" |
| local _status=0 |
if [ X"$DEST" == X"" ]; then |
| export DESTDIR=$DEST; export RELEASEDIR=$RELEASE |
|
| if [ X"$DESTDIR" == X"" ]; then |
|
| echo PLEASE SET \$DEST! >2& |
echo PLEASE SET \$DEST! >2& |
| exit |
exit 1 |
| fi |
fi |
| mkdir -p $DESTDIR $RELEASEDIR |
|
| empty_dir $DESTDIR & |
local _status=0 |
| cd /usr/src/etc && ${SUDO} nice make release |
local DESTDIR RELEASEDIR |
| |
|
| |
[ -e $DEST ] && empty_dir $DEST |
| |
${SUDO} install -d -g wheel -m 775 $DEST $RELEASE |
| |
|
| |
export DESTDIR=$DEST RELEASEDIR=$RELEASE |
| |
cd /usr/src/etc && ${SUDO} nice make SUDO="" release |
| _status=$? |
_status=$? |
| if [ $_status == 0 ]; then |
[ $_status == 0 ] && cd /usr/src/distrib/sets && ${SUDO} sh checkflist |
| cd /usr/src/distrib/sets && ${SUDO} sh checkflist |
_status=$? |
| _status=$? |
|
| fi |
[ $_status == 0 ] || echo System Release Failed |
| unset DESTDIR RELEASEDIR |
exit $_status |
| if [ $_status != 0 ]; then |
|
| echo System Release Failed |
|
| exit $_status |
|
| fi |
|
| } |
} |
| |
|
| build_xenocara() { |
build_xenocara() { |
|
|
| echo " system-release - Make and validate the system release" |
echo " system-release - Make and validate the system release" |
| echo " xenocara - Build and install xenocara" |
echo " xenocara - Build and install xenocara" |
| echo " xenocara-release - Make and validate the xenocara release" |
echo " xenocara-release - Make and validate the xenocara release" |
| echo " full-release - xenocara, xenocara-release, system, system-release" |
echo " full - xenocara, xenocara-release, system, system-release" |
| echo |
echo |
| } |
} |
| |
|
|
|
| xenocara-release) |
xenocara-release) |
| make_xenocara_release |
make_xenocara_release |
| ;; |
;; |
| full-release) |
full) |
| build_xenocara |
build_xenocara |
| make_xenocara_release |
make_xenocara_release |
| build_system |
build_system |