Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/distrib/sets Generate the /dist/obsolete_* files used b...



details:   https://anonhg.NetBSD.org/src/rev/2b68ba1121d4
branches:  netbsd-1-4
changeset: 468700:2b68ba1121d4
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Jun 05 20:17:43 1999 +0000

description:
Generate the /dist/obsolete_* files used by sysinst from the obsolete lists
in sets/lists/*. The sript sets/makeobsolete concatenates the mi and md
obsolete list files all or a specified set and dumps it in a file, in a
subdir specified on the command line (inspired from the maketar and makeflist
files).
Use this for all the sysinst-based installs.
Untested for non-i386, and the md obsolete list may be wrong or incomplete.
Each postmaster is supposed to check this on his port.

diffstat:

 distrib/sets/makeobsolete |  88 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 88 insertions(+), 0 deletions(-)

diffs (92 lines):

diff -r bdd0cc184ce8 -r 2b68ba1121d4 distrib/sets/makeobsolete
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sets/makeobsolete Sat Jun 05 20:17:43 1999 +0000
@@ -0,0 +1,88 @@
+#!/bin/sh
+#
+# $NetBSD: makeobsolete,v 1.1.2.2 1999/06/05 20:17:43 bouyer Exp $
+#
+# Print out the obsolete files for a set
+# Usage: makeobsolete [-b] [-x] [-a arch] [-m machine] [-s setsdir] \
+#    [-t target] [setname ...]
+#
+
+# set defaults
+: ${MAKE=make}
+machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | $MAKE -s -f-`}
+arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | $MAKE -s -f-`}
+setd=`pwd`
+nlists="base comp etc games man misc secr text"
+xlists="xbase xcomp xcontrib xfont xserver"
+lists=$nlists
+target=./dist
+
+# handle args
+while : ; do
+       case $1 in
+       -b*)
+               lists="$xlists $nlists"
+               ;;
+       -x*)
+               lists=$xlists;;
+       -a*)
+               arch=$2; shift
+               ;;
+       -m*)
+               machine=$2; shift
+               ;;
+       -s*)
+               setd=$2; shift
+               ;;
+       -t*)
+               target=$2;shift
+               ;;
+       -*)
+               cat 1>&2 <<USAGE
+Usage: $0 [-a arch] [-m machine] [-s setsdir] [setname ...]
+       -b              make netbsd + x11 lists
+       -x              only make x11 lists
+       -a arch         set arch (e.g, m68k, mips, powerpc)     [$arch]
+       -m machine      set machine (e.g, amiga, i386, macppc)  [$machine]
+       -s setsdir      directory to find sets  [$setd]
+       -t target       target directory [$target]
+       [setname ...]   sets to build
+USAGE
+               exit 1
+               ;;
+       *)
+               break
+               ;;
+       esac
+       shift
+done
+if [ -n "$1" ]; then
+       lists="$*"
+fi
+
+# Convert mipse[lb] to mips after processing command line arguments.
+arch=`echo $arch | sed s,^mipse.,mips,`
+
+if [ ! -d $target ] ; then
+       echo "target directory [$target] doesn't exists"
+       exit 1
+fi
+
+for setname in $lists; do
+       file=$target/${setname}_obsolete
+       (
+       if [ -f $setd/lists/$setname/obsolete.mi ]; then
+               cat $setd/lists/$setname/obsolete.mi
+       fi
+       if [ "$machine" != "$cpu" -a \
+           -f $setd/lists/$setname/obsolete.${arch} ]; then
+               cat $setd/lists/$setname/obsolete.${arch}
+       fi
+       if [ -f $setd/lists/$setname/obsolete.${machine} ]; then
+               cat $setd/lists/$setname/obsolete.${machine}
+       fi) | egrep -v '^#' | sort -u > $file
+       if [ ! -s $file ] ; then
+               rm $file
+       fi
+
+done | egrep -v '^#' | sort -u



Home | Main Index | Thread Index | Old Index