diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-11-18 13:11:27 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-11-18 13:11:27 +0000 |
commit | 4fbd711cae7b4e9f4b66c95725c960728b1f6166 (patch) | |
tree | 83f81b0aacab75ae8a463949c75688cc37ad346f | |
parent | 81ea6e0b0087a4f81cf2e45d4514d6b6f21c5762 (diff) | |
download | drakx-4fbd711cae7b4e9f4b66c95725c960728b1f6166.tar drakx-4fbd711cae7b4e9f4b66c95725c960728b1f6166.tar.gz drakx-4fbd711cae7b4e9f4b66c95725c960728b1f6166.tar.bz2 drakx-4fbd711cae7b4e9f4b66c95725c960728b1f6166.tar.xz drakx-4fbd711cae7b4e9f4b66c95725c960728b1f6166.zip |
final switch of drakbackup, logdrake and scannerdrake
to new option scheme
-rw-r--r-- | perl-install/harddrake/TODO | 2 | ||||
-rw-r--r-- | perl-install/standalone.pm | 35 | ||||
-rwxr-xr-x | perl-install/standalone/diskdrake | 22 | ||||
-rwxr-xr-x | perl-install/standalone/drakbackup | 22 | ||||
-rwxr-xr-x | perl-install/standalone/logdrake | 2 | ||||
-rwxr-xr-x | perl-install/standalone/scannerdrake | 2 |
6 files changed, 40 insertions, 45 deletions
diff --git a/perl-install/harddrake/TODO b/perl-install/harddrake/TODO index 5fccf0f0c..645285dc0 100644 --- a/perl-install/harddrake/TODO +++ b/perl-install/harddrake/TODO @@ -18,6 +18,8 @@ *** ide-scsi / ide-cd switch *** supermount switch +** add aliases for sound + ** 9.1 development *** move the usb-interface setting from drakx into harddrake, and do it at boot time *** nvidia proprietary module hook diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm index ca869f6a1..48852af5f 100644 --- a/perl-install/standalone.pm +++ b/perl-install/standalone.pm @@ -35,20 +35,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. "); my $progname = basename $0; -print "Running $progname\n"; my %usages = ( + 'diskdrake' => "[--{" . join(",", qw(hd nfs smb dav removable fileshare)) . "}]", + 'drakbackup' => N("[--config-info] [--daemon] [--debug] [--default] [--show-conf] +Backup and Restore application + +--default : save default directories. +--debug : show all debug messages. +--show-conf : list of files or directories to backup. +--config-info : explain configuration file options (for non-X users). +--daemon : use daemon configuration. +--help : show this message. +--version : show version name. +"), 'draksec' => N(" [OPTIONS]... --debug print debugging information"), 'drakxtv' => "[--no-guess]", 'drakupdate_fstab' => " [--add | --del] <device>\n", 'keyboardrake' => N("[keyboard]"), + 'logdrake' => N("[--file=myfyle] [--word=myword] [--explain=regexp] [--alert]"), 'printerdrake' => N(" [--skiptest] [--cups] [--lprng] [--lpd] [--pdq]"), 'rpmdrake' => N("[OPTION]... --no-confirmation don't ask first confirmation question in MandrakeUpdate mode --no-verify-rpm don't verify packages signatures --changelog-first display changelog before filelist in the description window --merge-all-rpmnew propose to merge all .rpmnew/.rpmsave files found"), + 'scannerdrake' => N("[--manual] [--device=dev] [--update-sane=sane_desc_dir] [--update-usbtable] [--dynamic=dev]"), 'XFdrake' => N(" [everything] XFdrake [--noauto] monitor XFdrake resolution"), @@ -59,31 +72,31 @@ $usages{Xdrakres} = $usages{XFdrake}; my ($i, @new_ARGV); -foreach my $opt (@ARGV) { +foreach (@ARGV) { $i++; - if ($opt eq '--help' || $opt eq '-h') { + if (/^-(-help|h)$/) { version(); print STDERR N("\nUsage: %s [--auto] [--beginner] [--expert] [-h|--help] [--noauto] [--testing] [-v|--version] ", $progname), if_($usages{$progname}, $usages{$progname}), "\n"; # print N("\nUsage: "), $::usage, "\n" if $::usage; exit(0); - } elsif ($opt eq '--version' || $opt eq '-v') { + } elsif (/^-(-version|v)$/) { version(); exit(0); - } elsif ($opt eq '--embedded') { + } elsif (/^--embedded$/) { (undef, $::XID, $::CCPID) = splice @ARGV, ($i-1), 3; $::isEmbedded = 1; - } elsif ($opt eq '--expert') { + } elsif (/^--expert$/) { $::expert = 1; - } elsif ($opt eq '--noauto') { + } elsif (/--noauto$/) { $::noauto = /-noauto/; - } elsif ($opt eq '--auto') { + } elsif (/^--auto$) { $::auto = 1; - } elsif ($opt eq '--testing') { + } elsif (/^--testing$/) { $::testing = 1; - } elsif ($opt eq '--beginner') { + } elsif (/^--beginner$/) { $::expert = 0; } else { - push @new_ARGV, $opt; + push @new_ARGV, $_; } } diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index a0b8cd158..285557781 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -36,18 +36,16 @@ use log; use c; -#my %options; -#my @l = @ARGV; -#while (my $e = shift @l) { -" my ($option) = $e =~ /--?(.*)/ or next; -# if ($option =~ /(.*?)=(.*)/) { -# $options{$1} = $2; -# } else { -# $options{$option} = ''; -# } -"} -#$::expert = defined(delete $options{expert}); -#$::testing = defined(delete $options{testing}); +my %options; +my @l = @ARGV; +while (my $e = shift @l) { + my ($option) = $e =~ /--?(.*)/ or next; + if ($option =~ /(.*?)=(.*)/) { + $options{$1} = $2; + } else { + $options{$option} = ''; + } +} my @types = qw(hd nfs smb dav removable fileshare); my ($type, $para) = ('hd', ''); diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 0394d147f..99f626588 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -128,24 +128,10 @@ use common; use Time::localtime; use detect_devices; -if ("@ARGV" =~ /--help|-h/) { - print q(Backup and Restore application - ---default : save default directories. ---debug : show all debug messages. ---show-conf : list of files or directories to backup. ---config-info : explain configuration file options (for non-X users). ---daemon : use daemon configuration. ---help : show this message. ---version : show version name. -); - exit(0); -} - -if ("@ARGV" =~ /--version/) { - print "Drakbackup Version 1.2\n"; - exit(0); -} +#if ("@ARGV" =~ /--version/) { +# print "Drakbackup Version 1.2\n"; +# exit(0); +#} # Backend Options. # make this global for status screen diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index 77406ab5b..442e5595b 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -40,8 +40,6 @@ if ($::isEmbedded) { #- parse arguments list. for (@ARGV) { - /^--version$/ and die 'version: $Id$ '."\n"; - /^--help$/ and die 'logdrake [--version] [--file=myfyle] [--word=myword] [--explain=regexp] [--alert]'; /^--explain=(.*)$/ and do { $::isExplain = ($::Explain) = $1; $::isFile = 1; $::File = "/var/log/explanations"; next }; /^--file=(.*)$/ and do { $::isFile = ($::File) = $1; next }; /^--word=(.*)$/ and do { $::isWord = ($::Word) = $1; next }; diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake index c89ff8754..810382d37 100755 --- a/perl-install/standalone/scannerdrake +++ b/perl-install/standalone/scannerdrake @@ -27,8 +27,6 @@ use common; use scanner; foreach (@ARGV) { - /^--version$/ and die 'version: $Id$ '."\n"; - /^--help$/ and die 'logdrake [--version] [--help] [--manual] [--device=dev] [--update-sane=sane_desc_dir] [--update-usbtable] [--dynamic=dev]'; /^--update-usbtable$/ and do { scanner::updateScannerDBfromUsbtable(); exit }; /^--update-sane=(.*)$/ and do { scanner::updateScannerDBfromSane($1); exit }; /^--manual$/ and $::Manual=1; |