diff options
Diffstat (limited to 'bootstrap/mkbootstrapkit')
-rwxr-xr-x | bootstrap/mkbootstrapkit | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/bootstrap/mkbootstrapkit b/bootstrap/mkbootstrapkit new file mode 100755 index 00000000000..a860df1bf11 --- /dev/null +++ b/bootstrap/mkbootstrapkit @@ -0,0 +1,41 @@ +#! /bin/sh +# +# $NetBSD: mkbootstrapkit,v 1.1 2004/08/15 20:06:39 jlam Exp $ +# +# Usage: mkbootstrapkit [kitdir] +# +# Make a source bootstrap kit. By default, the "kitdir" is +# ${TMPDIR}/bootstrap-kit-<today>, the resulting archive will extract +# a directory tree rooted in "bootstrap-kit-<today>". + +date=`date +%Y%m%d` +kitdir=${1:-${TMPDIR:=/tmp}/bootstrap-kit-${date}} +kitfile=${1:-${TMPDIR:=/tmp}/bootstrap-kit-${date}.tgz} + +bootstrapdir=`pwd` +pkgsrcdir=`dirname $bootstrapdir` + +echo "Creating $kitdir." +rm -rf $kitdir +mkdir -p $kitdir +cd $pkgsrcdir +for dir in \ + archivers/pax \ + bootstrap \ + net/tnftp \ + pkgtools/digest \ + pkgtools/libnbcompat \ + pkgtools/mtree \ + pkgtools/pkg_install \ + textproc/nbsed +do + echo "Copying $dir." + tar hcf - $dir | ( cd $kitdir; tar xf - ) +done + +echo "Archiving to $kitfile." +rm -f $kitfile +cd `dirname $kitdir` && tar zcpf $kitfile `basename $kitdir` + +echo "Removing $kitdir." +rm -rf $kitdir |