pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap Add a script to make a source bootstrap kit....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/26c26dd6e2f0
branches:  trunk
changeset: 479497:26c26dd6e2f0
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sun Aug 15 20:06:39 2004 +0000

description:
Add a script to 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>".

diffstat:

 bootstrap/mkbootstrapkit |  41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diffs (45 lines):

diff -r 80857429a256 -r 26c26dd6e2f0 bootstrap/mkbootstrapkit
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/bootstrap/mkbootstrapkit  Sun Aug 15 20:06:39 2004 +0000
@@ -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



Home | Main Index | Thread Index | Old Index