summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-08-15 20:06:39 +0000
committerjlam <jlam@pkgsrc.org>2004-08-15 20:06:39 +0000
commit14acff2d68b770ff5c6112ea94a58d54be625936 (patch)
tree4f412bb630894c3906b124495f7a3bbc901eddbd /bootstrap
parent3be4978451a65a708a72f4d5db1e8ccf7741f6d8 (diff)
downloadpkgsrc-14acff2d68b770ff5c6112ea94a58d54be625936.tar.gz
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 (limited to 'bootstrap')
-rwxr-xr-xbootstrap/mkbootstrapkit41
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