summaryrefslogtreecommitdiffstats
path: root/logdrake
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2001-09-03 20:26:25 +0000
committerYves Duret <yduret@mandriva.com>2001-09-03 20:26:25 +0000
commit957a25bf37c35900ac5786f0f5f268c8f6d0f65c (patch)
treedf6b2787e68c4148a4f4470a3a08071eef69be70 /logdrake
parentc3c78abffbcc161c13122b1f4a11280f8dd78478 (diff)
downloadcontrol-center-957a25bf37c35900ac5786f0f5f268c8f6d0f65c.tar
control-center-957a25bf37c35900ac5786f0f5f268c8f6d0f65c.tar.gz
control-center-957a25bf37c35900ac5786f0f5f268c8f6d0f65c.tar.bz2
control-center-957a25bf37c35900ac5786f0f5f268c8f6d0f65c.tar.xz
control-center-957a25bf37c35900ac5786f0f5f268c8f6d0f65c.zip
fix
Diffstat (limited to 'logdrake')
-rwxr-xr-xlogdrake26
1 files changed, 13 insertions, 13 deletions
diff --git a/logdrake b/logdrake
index 03f2f5d2..a9bdb930 100755
--- a/logdrake
+++ b/logdrake
@@ -52,10 +52,7 @@ sub translate {
$::isInstall and die "Not supported during install.\n";
-$::isFile = ($::File) = "@ARGV" =~ /--file (.+)/;
-if ($::isFile) {
- print "isFile mode : $::File\n";
-}
+my $in = 'interactive'->vnew('su', 'default');
$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
if ($::isEmbedded) {
@@ -64,17 +61,16 @@ if ($::isEmbedded) {
print "mcc pid\t$::CCPID\n";
}
-my $in = 'interactive'->vnew('su', 'default');
-
-local $_ = join '', @ARGV;
+#- parse arguments list.
+for (@ARGV) {
+ /^--version$/ and die 'version: $Id$ '."\n";
+ /^--help$/ and die 'logdrake [--version] [--file=myfyle] [--word=myword]';
+ /^--file=(.*)$/ and do { $::isFile = ($::File) = $1; next };
+ /^--word=(.*)$/ and do { $::isWord = ($::Word) = $1; next };
+}
-/-h/ and die sprintf( _("usage: logdrake [--version]\n"));
-/-version/ and die 'version: $Id$ '."\n";
$::isTail=1 if ($::isFile);
-#/-t/;
-
$|= 1 if ($::isTail);
-print "isTail mode\n" if ($::isTail);
my $h=chomp_(`hostname -s`);
my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
@@ -241,7 +237,8 @@ sub parse_file {
my $ey = $e_yes->get_chars(0, -1);
my $en = $e_no->get_chars(0, -1);
$ey =~ s/ OR /\|/;
-
+ $ey = $ey .($::Word) if ($::isWord);
+
if ($cal_mode) {
my ($year, $month, $day) = $cal->get_date();
$ey= $months[$month]."\\s{1,2}$day\\s.*$ey\n";
@@ -395,6 +392,9 @@ sub destroy_window {
# log
# $Log$
+# Revision 1.24 2001/09/03 20:26:25 yduret
+# fix
+#
# Revision 1.23 2001/08/28 15:43:01 yduret
# fix window size in embedded mode
#