]> git.donarmstrong.com Git - bin.git/blobdiff - stodo
remove convert_to_xls and .sa_bin
[bin.git] / stodo
diff --git a/stodo b/stodo
index 48acf4f16a0c332f0c59d80fcdfa17f7fb3fa672..7cc9b5dde45b768bc7a12b2c5d17cc40df61686a 100755 (executable)
--- a/stodo
+++ b/stodo
@@ -99,7 +99,7 @@ my %options = (quiet           => 0,
 
 GetOptions(\%options,'debug|d+','help|h|?','man|m','quiet|q+','simulate|s+');
 
-pod2usage() if $options{help} or not exists $ENV{TODODB};
+pod2usage() if $options{help};
 pod2usage({verbose=>2}) if $options{man};
 
 $DEBUG = $options{debug};
@@ -109,17 +109,21 @@ my $tododb = exists $ENV{TODODB} ? $ENV{TODODB} : '.todo';
 if ($tododb !~ m#^/#) {
      $tododb = cwd().'/'.$tododb;
 }
+if (not -r $tododb) {
+     print STDERR "Todo DB '$tododb' does not exist or is not readable\n";
+     exit 1;
+}
 $tododb = full_readlink($tododb);
 my $base_dir = dirname($tododb);
 my $tododb_name = basename($tododb);
 
 if (not -e "$base_dir/.svn") {
-     print "$base_dir/.svn doesn't exist, not commiting\n" unless $options{quiet};
+     print STDERR "$base_dir/.svn doesn't exist, not commiting\n" unless $options{quiet};
      exit 0;
 }
 
 if (not -e "$base_dir/.svn/text-base/${tododb_name}.svn-base") {
-     print "$base_dir/.svn/text-base/${tododb_name}.svn-base doesn't exist, not committing\n" unless $options{quiet};
+     print STDERR "$base_dir/.svn/text-base/${tododb_name}.svn-base doesn't exist, not committing\n" unless $options{quiet};
      exit 0;
 }
 
@@ -136,7 +140,7 @@ while (<$svn_entries_fh>) {
      last;
 }
 if ($ENV{STODO_NO_COMMIT}) {
-     print "Exiting because of STODO_NO_COMMIT env variable\n" unless $options{quiet};
+     print STDERR "Exiting because of STODO_NO_COMMIT env variable\n" unless $options{quiet};
      exit 0;
 }
 if (not defined $svn_host and (not defined $url_type or $url_type ne 'file')) {