[BACK]Return to release.sh CVS log [TXT][DIR] Up to [local] / openbsd / update_openbsd

Diff for /openbsd/update_openbsd/release.sh between version 1.23 and 1.28

version 1.23, 2008/10/11 23:11:58 version 1.28, 2008/11/05 17:14:40
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
 # $RedRiver: release.sh,v 1.22 2008/07/08 22:46:01 andrew Exp $  # $RedRiver: release.sh,v 1.27 2008/11/05 16:43:57 andrew Exp $
 #  #
 # Copyright (c) 2002, 2008 Steven Roberts <sroberts@fenderq.com>  # Copyright (c) 2002, 2008 Steven Roberts <sroberts@fenderq.com>
 #  #
Line 16 
Line 16 
 # 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"
Line 24 
Line 25 
 XSRCDIR="/usr/xenocara"  XSRCDIR="/usr/xenocara"
 PORTSPATH="/usr/ports"  PORTSPATH="/usr/ports"
   
 if [ -e ${HOME}/.releaserc ]; then  if [ -e /etc/release.conf ]; then
         . ${HOME}/.releaserc      . /etc/release.conf
 fi  fi
   export CVSROOT
   
   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
 }  }
   
Line 58 
Line 64 
 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() {
 echo "---------- Make and validate the system release ----------"  echo "---------- Make and validate the system release ----------"
 cd /usr/src/distrib/crunch && make obj depend && make all install  cd /usr/src/distrib/crunch && make obj depend && make all install
 export DESTDIR=$DEST; export RELEASEDIR=$RELEASE  export DESTDIR=$DEST; export RELEASEDIR=$RELEASE
 rm -rf $DESTDIR  if [ X"$DESTDIR" == X"" ]; then
           echo PLEASE SET \$DEST! >2&
           exit
   fi
   rm -rf $DESTDIR/* $DESTDIR/.*
 mkdir -p $DESTDIR $RELEASEDIR  mkdir -p $DESTDIR $RELEASEDIR
 cd /usr/src/etc && nice make release  cd /usr/src/etc && nice make release
 cd /usr/src/distrib/sets && sh checkflist  cd /usr/src/distrib/sets && sh checkflist
Line 74 
Line 84 
   
 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
Line 85 
Line 93 
 make_xenocara_release() {  make_xenocara_release() {
 echo "---------- Make and validate the xenocara release ----------"  echo "---------- Make and validate the xenocara release ----------"
 export DESTDIR=$DEST RELEASEDIR=$RELEASE  export DESTDIR=$DEST RELEASEDIR=$RELEASE
 rm -rf $DESTDIR  if [ X"$DESTDIR" == X"" ]; then
           echo PLEASE SET \$DEST! >2&
           exit
   fi
   rm -rf $DESTDIR/* $DESTDIR/.*
 mkdir -p $DESTDIR $RELEASEDIR  mkdir -p $DESTDIR $RELEASEDIR
 cd $XSRCDIR  cd $XSRCDIR
 nice make release  nice make release
Line 103 
Line 115 
 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     - Do system, xenocara, system-release, xenocara-release"  echo "  full-release     - xenocara, xenocara-release, system, system-release"
 echo  echo
 }  }
   
Line 121 
Line 133 
 echo " Kernel: $KERNEL-$ARCH"  echo " Kernel: $KERNEL-$ARCH"
 echo "   Dest: $DEST"  echo "   Dest: $DEST"
 echo "Release: $RELEASE"  echo "Release: $RELEASE"
   if [ X"$CVSROOT" != X"" ]; then
           echo "   Root: $CVSROOT"
   fi
 echo  echo
   
 if [ $# = 0 ]; then usage; exit 1; fi  if [ $# = 0 ]; then usage; exit 1; fi
Line 128 
Line 143 
 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
 ;;  ;;
Line 151 
Line 160 
 ;;  ;;
 xenocara-release)  xenocara-release)
 make_xenocara_release  make_xenocara_release
   ;;
   full-release)
   build_xenocara
   make_xenocara_release
   build_system
   make_system_release
 ;;  ;;
 *)  *)
 echo "---------- Abort! Abort! ----------"  echo "---------- Abort! Abort! ----------"

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.28

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>