summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-05-29 02:13:31 +0000
committerphk <phk@FreeBSD.org>1995-05-29 02:13:31 +0000
commit91f5f82dabe786eea211e0bef0c0adcc2728a8d3 (patch)
tree9d1a8232a74ab656ab942b22a014cdcbab63000f
parent79d387438f1dada6d7e6f916cbf9e914be3a0c3c (diff)
downloadFreeBSD-src-91f5f82dabe786eea211e0bef0c0adcc2728a8d3.zip
FreeBSD-src-91f5f82dabe786eea211e0bef0c0adcc2728a8d3.tar.gz
Get help files form /stand/help.tgz
-rw-r--r--release/Makefile4
-rw-r--r--release/sysinstall/system.c40
-rw-r--r--usr.sbin/sade/system.c40
-rw-r--r--usr.sbin/sysinstall/system.c40
4 files changed, 54 insertions, 70 deletions
diff --git a/release/Makefile b/release/Makefile
index a4c8e74..f922956 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.187 1995/05/29 00:49:52 jkh Exp $
+# $Id: Makefile,v 1.188 1995/05/29 01:28:21 phk Exp $
#
# How to roll a release:
#
@@ -335,6 +335,8 @@ release.8: write_mfs_in_kernel
cd ${RD}/trees/bin/usr/share/FAQ/Text && \
install -c RELNOTES.FreeBSD ${RD}/mfsfd/stand/help/en_US.ISO8859-1/RELNOTES && \
install -c README ${RD}/mfsfd/stand/help/en_US.ISO8859-1/README
+ (cd ${RD}/mfsfd/stand/help && tar cf - | gzip -9 > ../help.tgz)
+ (cd ${RD}/mfsfd/stand && rm -rf help)
( \
a=`expr ${BOOTMFSSIZE} \* 2` && \
echo && \
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c
index 3c25cc3..6aaea42 100644
--- a/release/sysinstall/system.c
+++ b/release/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.39 1995/05/28 09:36:06 jkh Exp $
+ * $Id: system.c,v 1.40 1995/05/29 00:50:05 jkh Exp $
*
* Jordan Hubbard
*
@@ -187,6 +187,7 @@ systemDisplayFile(char *file)
use_helpline(NULL);
w = dupwin(newscr);
dialog_textbox(file, fname, LINES, COLS);
+ unlink(fname);
touchwin(w);
wrefresh(w);
delwin(w);
@@ -197,33 +198,26 @@ systemDisplayFile(char *file)
char *
systemHelpFile(char *file, char *buf)
{
- char *cp, *fname = NULL;
+ char *cp;
if (!file)
return NULL;
if ((cp = getenv("LANG")) != NULL) {
- snprintf(buf, FILENAME_MAX, "help/%s/%s", cp, file);
+ snprintf(buf, FILENAME_MAX, "%s/%s", cp, file);
+ vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s",buf);
+ snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
if (file_readable(buf))
- fname = buf;
- else {
- snprintf(buf, FILENAME_MAX, "/stand/help/%s/%s", cp, file);
- if (file_readable(buf))
- fname = buf;
- }
- }
- if (!fname) {
- snprintf(buf, FILENAME_MAX, "help/en_US.ISO8859-1/%s", file);
- if (file_readable(buf))
- fname = buf;
- else {
- snprintf(buf, FILENAME_MAX, "/stand/help/en_US.ISO8859-1/%s",
- file);
- if (file_readable(buf))
- fname = buf;
- }
- }
- return fname;
+ return buf;
+ }
+ /* Fall back to normal imperialistic mode :-) */
+ cp = "en_US.ISO8859-1";
+ snprintf(buf, FILENAME_MAX, "%s/%s", cp, file);
+ vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s",buf);
+ snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
+ if (file_readable(buf))
+ return buf;
+ return NULL;
}
void
@@ -315,7 +309,7 @@ vsystem(char *fmt, ...)
dup2(DebugFD, 1);
dup2(DebugFD, 2);
}
-#ifdef CRUNCHED_BINARY
+#ifdef NOT_A_GOOD_IDEA_CRUNCHED_BINARY
if (magic) {
char *argv[100];
i = 0;
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index 3c25cc3..6aaea42 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.39 1995/05/28 09:36:06 jkh Exp $
+ * $Id: system.c,v 1.40 1995/05/29 00:50:05 jkh Exp $
*
* Jordan Hubbard
*
@@ -187,6 +187,7 @@ systemDisplayFile(char *file)
use_helpline(NULL);
w = dupwin(newscr);
dialog_textbox(file, fname, LINES, COLS);
+ unlink(fname);
touchwin(w);
wrefresh(w);
delwin(w);
@@ -197,33 +198,26 @@ systemDisplayFile(char *file)
char *
systemHelpFile(char *file, char *buf)
{
- char *cp, *fname = NULL;
+ char *cp;
if (!file)
return NULL;
if ((cp = getenv("LANG")) != NULL) {
- snprintf(buf, FILENAME_MAX, "help/%s/%s", cp, file);
+ snprintf(buf, FILENAME_MAX, "%s/%s", cp, file);
+ vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s",buf);
+ snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
if (file_readable(buf))
- fname = buf;
- else {
- snprintf(buf, FILENAME_MAX, "/stand/help/%s/%s", cp, file);
- if (file_readable(buf))
- fname = buf;
- }
- }
- if (!fname) {
- snprintf(buf, FILENAME_MAX, "help/en_US.ISO8859-1/%s", file);
- if (file_readable(buf))
- fname = buf;
- else {
- snprintf(buf, FILENAME_MAX, "/stand/help/en_US.ISO8859-1/%s",
- file);
- if (file_readable(buf))
- fname = buf;
- }
- }
- return fname;
+ return buf;
+ }
+ /* Fall back to normal imperialistic mode :-) */
+ cp = "en_US.ISO8859-1";
+ snprintf(buf, FILENAME_MAX, "%s/%s", cp, file);
+ vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s",buf);
+ snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
+ if (file_readable(buf))
+ return buf;
+ return NULL;
}
void
@@ -315,7 +309,7 @@ vsystem(char *fmt, ...)
dup2(DebugFD, 1);
dup2(DebugFD, 2);
}
-#ifdef CRUNCHED_BINARY
+#ifdef NOT_A_GOOD_IDEA_CRUNCHED_BINARY
if (magic) {
char *argv[100];
i = 0;
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index 3c25cc3..6aaea42 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.39 1995/05/28 09:36:06 jkh Exp $
+ * $Id: system.c,v 1.40 1995/05/29 00:50:05 jkh Exp $
*
* Jordan Hubbard
*
@@ -187,6 +187,7 @@ systemDisplayFile(char *file)
use_helpline(NULL);
w = dupwin(newscr);
dialog_textbox(file, fname, LINES, COLS);
+ unlink(fname);
touchwin(w);
wrefresh(w);
delwin(w);
@@ -197,33 +198,26 @@ systemDisplayFile(char *file)
char *
systemHelpFile(char *file, char *buf)
{
- char *cp, *fname = NULL;
+ char *cp;
if (!file)
return NULL;
if ((cp = getenv("LANG")) != NULL) {
- snprintf(buf, FILENAME_MAX, "help/%s/%s", cp, file);
+ snprintf(buf, FILENAME_MAX, "%s/%s", cp, file);
+ vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s",buf);
+ snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
if (file_readable(buf))
- fname = buf;
- else {
- snprintf(buf, FILENAME_MAX, "/stand/help/%s/%s", cp, file);
- if (file_readable(buf))
- fname = buf;
- }
- }
- if (!fname) {
- snprintf(buf, FILENAME_MAX, "help/en_US.ISO8859-1/%s", file);
- if (file_readable(buf))
- fname = buf;
- else {
- snprintf(buf, FILENAME_MAX, "/stand/help/en_US.ISO8859-1/%s",
- file);
- if (file_readable(buf))
- fname = buf;
- }
- }
- return fname;
+ return buf;
+ }
+ /* Fall back to normal imperialistic mode :-) */
+ cp = "en_US.ISO8859-1";
+ snprintf(buf, FILENAME_MAX, "%s/%s", cp, file);
+ vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s",buf);
+ snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
+ if (file_readable(buf))
+ return buf;
+ return NULL;
}
void
@@ -315,7 +309,7 @@ vsystem(char *fmt, ...)
dup2(DebugFD, 1);
dup2(DebugFD, 2);
}
-#ifdef CRUNCHED_BINARY
+#ifdef NOT_A_GOOD_IDEA_CRUNCHED_BINARY
if (magic) {
char *argv[100];
i = 0;
OpenPOWER on IntegriCloud