42 lines
944 B
Bash
Executable file
42 lines
944 B
Bash
Executable file
#! /bin/sh
|
|
#
|
|
# $NetBSD: mkbootstrapkit,v 1.2 2006/01/02 23:27:09 reed 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 \
|
|
devel/bmake \
|
|
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
|