[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.18 and 1.19

version 1.18, 2008/04/16 21:54:28 version 1.19, 2008/05/22 18:39:20
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
 # $RedRiver: release.sh,v 1.17 2008/04/16 20:49:54 andrew Exp $  # $RedRiver: release.sh,v 1.18 2008/04/16 20:54:28 andrew Exp $
 #  #
 # Copyright (c) 2002 - 2007 Steven Roberts <fenderq@fenderq.com>  # Copyright (c) 2002, 2008 Steven Roberts <sroberts@fenderq.com>
 #  #
 # Permission to use, copy, modify, and distribute this software for any  # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above  # purpose with or without fee is hereby granted, provided that the above
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="OPENBSD_4_2"  TAG=${TAG:=`uname -sr | tr '[:lower:] .' '[:upper:]_'`}
 KERNEL="GENERIC"  KERNEL="GENERIC"
 ARCH="i386"  ARCH=`machine`
 DEST="/home/destdir"  DEST="/home/destdir"
 RELEASE="/home/releasedir"  RELEASE="/home/releasedir"
 XSRCDIR="/usr/src/xenocara"  XSRCDIR="/usr/src/xenocara"
 PORTSPATH="/usr/ports"  PORTSPATH="/usr/ports"
   
 DEST="/usr/dest"  
 RELEASE="/usr/release"  
 TAG=${TAG:=`uname -sr | tr '[:lower:] .' '[:upper:]_'`}  
 ARCH=`machine`  
 #SOURCES="src ports XF4"  
 #SOURCES="src ports"  
 SOURCES="/usr/src $XSRCDIR $PORTSPATH"  
   
 # Anonymous CVS - http://www.openbsd.org/anoncvs.html  # Anonymous CVS - http://www.openbsd.org/anoncvs.html
 #CVSROOT="anoncvs@anoncvs3.usa.openbsd.org:/cvs"  #CVSROOT="anoncvs@anoncvs3.usa.openbsd.org:/cvs"
 #CVSROOT="anoncvs@anoncvs1.usa.openbsd.org:/cvs"  #CVSROOT="anoncvs@anoncvs1.usa.openbsd.org:/cvs"
Line 47 
Line 39 
   
 update_sources() {  update_sources() {
 echo "---------- Update sources ----------"  echo "---------- Update sources ----------"
 for d in $SOURCES; do  for d in /usr/src ${XSRCDIR} ${PORTSPATH}; do
         _cvstag=-r$TAG         _cvstag=-r$TAG
         if [ X"$TAG" == X"HEAD" ]; then         if [ X"$TAG" == X"HEAD" ]; then
                 _cvstag=""                 _cvstag=""
         fi         fi
         echo "cd $d && cvs -q -z6 update $_cvstag -Pd"         echo "cd $d && cvs update $_cvstag -Pd"
         cd $d && cvs -q -z6 update $_cvstag -Pd         cd $d && cvs update $_cvstag -Pd
 done  done
 }  }
   
Line 63 
Line 55 
 config $KERNEL  config $KERNEL
 cd ../compile/$KERNEL  cd ../compile/$KERNEL
 make clean depend && make  make clean depend && make
 cp /bsd /bsd.old && cp bsd /  make install
 }  }
   
 build_system() {  build_system() {
 echo "---------- Build a new system ----------"  echo "---------- Build a new system ----------"
 rm -rf /usr/obj/*  rm -rf /usr/obj/*
 cd /usr/src && nice make obj  cd /usr/src && nice make obj
 cd /usr/src/etc && export 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.  # Update /etc, /var, and /dev/MAKEDEV by hand.
 }  }
Line 79 
Line 71 
 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
 if (-e $DESTDIR); then  rm -rf $DESTDIR
         mkdir $DESTDIR/old-  
         mv $DESTDIR/* $DESTDIR/old- 2>/dev/null  
         rm -rf $DESTDIR/old- &  
 fi  
 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 93 
Line 81 
 build_xenocara() {  build_xenocara() {
 echo "---------- Build and install xenocara ----------"  echo "---------- Build and install xenocara ----------"
 rm -rf /usr/xobj/*  rm -rf /usr/xobj/*
   mkdir -p /usr/xobj
 cd $XSRCDIR  cd $XSRCDIR
 make bootstrap  make bootstrap
 make obj  make obj
Line 102 
Line 91 
 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
 if (-e $DESTDIR); then  rm -rf $DESTDIR
         mkdir $DESTDIR/old-  
         mv $DESTDIR/* $DESTDIR/old- 2>/dev/null  
         rm -rf $DESTDIR/old- &  
 fi  
 mkdir -p $DESTDIR $RELEASEDIR  mkdir -p $DESTDIR $RELEASEDIR
 cd $XSRCDIR  cd $XSRCDIR
 nice make release  nice make release
Line 124 
Line 109 
 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  echo
 }  }
   
 if [ $# = 0 ]; then usage; exit 1; fi  
   
 if [ `whoami` != "root" ]; then  if [ `whoami` != "root" ]; then
 echo "You must be root to create a release."  echo "You must be root to build a release."
 exit 1  exit 1
 fi  fi
   
Line 144 
Line 128 
 echo "   Dest: $DEST"  echo "   Dest: $DEST"
 echo "Release: $RELEASE"  echo "Release: $RELEASE"
 echo  echo
   
   if [ $# = 0 ]; then usage; exit 1; fi
   
 for i in $*  for i in $*
 do  do

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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