summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/miniroot/list2sh.awk7
-rw-r--r--distrib/miniroot/maketz.sh20
2 files changed, 26 insertions, 1 deletions
diff --git a/distrib/miniroot/list2sh.awk b/distrib/miniroot/list2sh.awk
index 17d7de5cb84..5d897d7c61a 100644
--- a/distrib/miniroot/list2sh.awk
+++ b/distrib/miniroot/list2sh.awk
@@ -1,4 +1,4 @@
-# $OpenBSD: list2sh.awk,v 1.13 2009/04/17 03:50:53 deraadt Exp $
+# $OpenBSD: list2sh.awk,v 1.14 2009/05/05 05:46:31 deraadt Exp $
# $NetBSD: list2sh.awk,v 1.2 1996/05/04 15:45:31 pk Exp $
BEGIN {
@@ -64,6 +64,11 @@ $1 == "HASH" {
printf("(cd ${TARGDIR}; sh $UTILS/makehash.sh var/hash $REV $RELEASEDIR)\n");
next;
}
+$1 == "TZ" {
+ printf("echo '%s'\n", $0);
+ printf("(cd ${TARGDIR}; sh $UTILS/maketz.sh $DESTDIR)\n");
+ next;
+}
$1 == "COPYDIR" {
printf("echo '%s'\n", $0);
printf("(cd ${TARGDIR}/%s && find . ! -name . | xargs /bin/rm -rf)\n",
diff --git a/distrib/miniroot/maketz.sh b/distrib/miniroot/maketz.sh
new file mode 100644
index 00000000000..2023fde239d
--- /dev/null
+++ b/distrib/miniroot/maketz.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+destdir=$1
+
+if [ $# -lt 1 ]; then
+ echo usage: maketz.sh DESTDIR
+ exit 0
+fi
+echo maketz args $destdir
+
+#ls -1dF `find . -print` | \
+# sed -e 's/^.\///' | grep -v '^zone.tab$' | grep -v '^$') > var/tzlist
+
+mkdir -p var/tzdir
+cd var/tzdir
+
+touch FOO
+(cd $destdir/usr/share/zoneinfo; find . -type d -print0) | xargs -0 mkdir -p
+(cd $destdir/usr/share/zoneinfo; find . -type f -print0) | xargs -0 -n 1 ln FOO
+rm FOO