Get help files form /stand/help.tgz

This commit is contained in:
Poul-Henning Kamp 1995-05-29 02:13:31 +00:00
parent 1f71f6055b
commit de42a94e4b
4 changed files with 54 additions and 70 deletions

View File

@ -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 && \

View File

@ -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;

View File

@ -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;

View File

@ -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;