From: Ken Youens-Clark Date: Wed, 15 Apr 2009 18:08:44 +0000 (+0000) Subject: Cleaned up a bit, checked for interactive tty so that ugly warning X-Git-Tag: v0.11008~197 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eca76a5056452ce2b4d4be29b2ed7775579497fb;p=dbsrgits%2FSQL-Translator.git Cleaned up a bit, checked for interactive tty so that ugly warning doesn't show up in test suite. --- diff --git a/bin/sqlt-diff-old b/bin/sqlt-diff-old index 4aff12f..96a3c92 100755 --- a/bin/sqlt-diff-old +++ b/bin/sqlt-diff-old @@ -119,6 +119,15 @@ for my $arg ( @ARGV ) { pod2usage(1) if $help; pod2usage('Please specify only two schemas to diff') if scalar @input > 2; +pod2usage('No input') if !@input; + +if ( my $interactive = -t STDIN && -t STDOUT ) { + print STDERR join("\n", + "sqlt-diff-old is deprecated. Please sqlt-diff, and tell us ", + "about any problems or patch SQL::Translator::Diff", + '', + ); +} my $tr = SQL::Translator->new; my @parsers = $tr->list_parsers; @@ -452,8 +461,6 @@ if ( @diffs ) { } } -print STDERR "sqlt-diff-old is deprecated, please try and use sqlt-diff, and tell us about any problems or patch SQL::Translator::Diff\n"; - if ( @diffs ) { print join( "\n", "-- Convert schema '$s2_name' to '$s1_name':\n", @diffs, "\n"