Allow the user to select a progress bar for file extraction, rather

than simply silence or maximum verbosity. Leverage progress(1).
This commit is contained in:
jhawk 2003-01-22 05:59:07 +00:00
parent d8390bf622
commit 5541e55b38
5 changed files with 29 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: menus.mi.en,v 1.62 2002/10/16 08:04:26 itojun Exp $ */
/* $NetBSD: menus.mi.en,v 1.63 2003/01/22 05:59:07 jhawk Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -462,3 +462,8 @@ menu rootsh, title "Root shell";
option "/bin/csh", exit, action {shellpath = "/bin/csh";};
option "/bin/ksh", exit, action {shellpath = "/bin/ksh";};
option "/bin/sh", exit, action {shellpath = "/bin/sh";};
menu extract, title "Select set extraction verbosity";
option "Progress bar (recommended)", exit, action { yesno = 1; };
option "Silent", exit, action { yesno = 0; };
option "Verbose file name listing (slow)", exit, action { yesno = 2; };

View File

@ -1,4 +1,4 @@
/* $NetBSD: menus.mi.fr,v 1.42 2002/10/16 08:04:27 itojun Exp $ */
/* $NetBSD: menus.mi.fr,v 1.43 2003/01/22 05:59:07 jhawk Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -420,3 +420,9 @@ menu ip6autoconf, title "Faire la configuration automatique IPv6 ?";
menu dhcpautoconf, title "Exécutez la configuration automatique de DHCP?";
option "Yes", exit, action {yesno = 1;};
option "No", exit, action {yesno = 0;};
menu extract, title "Methode d'indication de l'extraction d'ensemble ?";
option "Thermometre (recommendeé)", exit, action { yesno = 1; };
option "Silencieux", exit, action { yesno = 0; };
option "Liste verbeuse des fichiers (lent)", exit, action
{ yesno = 2; };

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.mi.en,v 1.94 2003/01/04 10:07:45 jmmv Exp $ */
/* $NetBSD: msg.mi.en,v 1.95 2003/01/22 05:59:07 jhawk Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -565,7 +565,7 @@ message distdir
{What directory shall I use for %s? }
message verboseextract
{During the extraction process, do you want to see the file names as
{During the extraction process, what do you want to see as
each file is extracted?
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.mi.fr,v 1.45 2002/08/12 02:22:53 grant Exp $ */
/* $NetBSD: msg.mi.fr,v 1.46 2003/01/22 05:59:07 jhawk Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -560,8 +560,8 @@ message distdir
{Quel répertoire dois je utiliser pour %s ?}
message verboseextract
{Pendant la procédure d'extraction des fichiers, voulez vous voir leur
nom apparaître au fur et à mesure qu'ils seront extraits ?
{Pendant la procédure d'extraction des fichiers, qu'est-ce que vous voulez
voir pendant qu'ils seront extraits ?
}
message badls

View File

@ -1,4 +1,4 @@
/* $NetBSD: util.c,v 1.80 2003/01/11 22:32:43 christos Exp $ */
/* $NetBSD: util.c,v 1.81 2003/01/22 05:59:08 jhawk Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -432,7 +432,7 @@ ask_verbose_dist()
if (verbose < 0) {
msg_display(MSG_verboseextract);
process_menu(MENU_noyes);
process_menu(MENU_extract);
verbose = yesno;
wclear(stdscr);
wrefresh(stdscr);
@ -462,8 +462,15 @@ extract_file(path)
target_chdir_or_die("/");
/* now extract set files files into "./". */
tarexit = run_prog(RUN_DISPLAY, NULL,
"pax -zr%spe -O -f %s", verbose ? "v" : "", path);
if (verbose==1)
tarexit = run_prog(RUN_DISPLAY, NULL,
"progress -zf %s pax -rpe -O", path);
else if (verbose==2)
tarexit = run_prog(RUN_DISPLAY, NULL,
"pax -zrvpe -f %s -O", path);
else
tarexit = run_prog(RUN_DISPLAY, NULL,
"pax -zrpe -f %s -O", path);
/* Check tarexit for errors and give warning. */
if (tarexit) {