summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorjlam <jlam>2004-08-15 20:06:39 +0000
committerjlam <jlam>2004-08-15 20:06:39 +0000
commite3f57e2f4fe0375deec82199552558ee38e22d23 (patch)
tree4f412bb630894c3906b124495f7a3bbc901eddbd /bootstrap
parent6af155e657459b50caa7603fa40621695c1d0a34 (diff)
downloadpkgsrc-e3f57e2f4fe0375deec82199552558ee38e22d23.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