[bigtop] r1556 committed - bigtop script now accepts -s without -a or -n to dump a bigtop file to...

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 11, 2010, 7:57:35 AM10/11/10
to gan...@googlegroups.com
Revision: 1556
Author: crow.phil
Date: Mon Oct 11 04:56:21 2010
Log: bigtop script now accepts -s without -a or -n to dump a bigtop file to
stdout.

http://code.google.com/p/bigtop/source/detail?r=1556

Modified:
/trunk/Changes
/trunk/lib/Bigtop.pm
/trunk/scripts/bigtop

=======================================
--- /trunk/Changes Sat Jul 10 15:16:12 2010
+++ /trunk/Changes Mon Oct 11 04:56:21 2010
@@ -1,5 +1,9 @@
Revision history for Perl extension Bigtop.

+0.39
+ - Changed bigtop script so -a and -n are optional if -s is used. In
+ that case, a bigtop file is generated and dumped to standard out.
+
0.38 Sat Jul 10 17:02:39 CDT 2010 for CPAN distribution
- Corrected various pod flaws.
- Added a gaurd so the full bigtop test is skipped if there are spaces
=======================================
--- /trunk/lib/Bigtop.pm Sat Jul 10 15:16:12 2010
+++ /trunk/lib/Bigtop.pm Mon Oct 11 04:56:21 2010
@@ -5,7 +5,7 @@
use Carp;
use File::Spec;

-our $VERSION = '0.38';
+our $VERSION = '0.39';

sub write_file {
my $file_name = shift;
=======================================
--- /trunk/scripts/bigtop Sat Jul 10 15:00:34 2010
+++ /trunk/scripts/bigtop Mon Oct 11 04:56:21 2010
@@ -53,6 +53,9 @@
elsif ( $add ) {
make_addition( $script_help_style, $add, @ARGV );
}
+elsif ( $style ) {
+ make_bigtop_file( $script_help_style, @ARGV );
+}
else { # default, use a file
my $bigtop_file = shift or die $usage;

@@ -83,6 +86,23 @@
finddepth( $purger, '_Inline' );
rmdir '_Inline';
}
+
+sub make_bigtop_file {
+ my $style = shift;
+ my @models = @_;
+ my $bigtop_string;
+
+ if ( @models ) {
+ $bigtop_string = Bigtop::ScriptHelp->get_big_default(
+ $style, $new, @models
+ );
+ }
+ else {
+ $bigtop_string = Bigtop::ScriptHelp->get_minimal_default( $new );
+ }
+
+ print $bigtop_string;
+}

sub make_new {
my $style = shift;

Reply all
Reply to author
Forward
0 new messages