]> git.donarmstrong.com Git - bin.git/blobdiff - sa
update sa and add simple_ssl
[bin.git] / sa
diff --git a/sa b/sa
index 0557d25f952b3d6725e6dda1389cf1c84a5580b5..a8da86b179084620d396ae960b550dc22f48567b 100755 (executable)
--- a/sa
+++ b/sa
@@ -56,7 +56,7 @@ my %options = (quick           => 1,
               man             => 0,
              );
 
-GetOptions(\%options,'quick|Q!','quiet|q!','debug|d+','help|h|?','man|m');
+GetOptions(\%options,'quick|Q+','quiet|q!','debug|d+','help|h|?','man|m');
 
 pod2usage() if $options{help};
 pod2usage({verbose=>2}) if $options{man};
@@ -86,6 +86,7 @@ sub parse_config_file {
          next if /^#/;
          my ($repo,$command) = split /\t/,$_,2;
          $repo =~ s/^\~/$home/;
+         $command =~ s/^\~/$home/ if defined $command;
          $$repos{$repo} = $command;
      }
 }
@@ -94,6 +95,12 @@ sub parse_config_file {
 my $HOME=User->Home;
 my $HOSTNAME=qx(hostname);
 $HOSTNAME=~s/\n//g;
+my $CAN_IGNORE_EXTERNALS = 0;
+qx(svn --version) =~ /\(r(\d+)\)/;
+if ($1 > 13838) {
+     $CAN_IGNORE_EXTERNALS = 1;
+}
+
 my %repos;
 for ('/etc/sa.conf', "${HOME}/.sarc", "${HOME}/.sarc_${HOSTNAME}", "${HOME}/.sarc_local") {
      if (-e $_) {
@@ -101,7 +108,6 @@ for ('/etc/sa.conf', "${HOME}/.sarc", "${HOME}/.sarc_${HOSTNAME}", "${HOME}/.sar
      }
 }
 
-
 $DEBUG = $options{debug};
 
 my $command;
@@ -113,13 +119,14 @@ else {
      $command = 'status';
 }
 
-
 while (my ($repo,$run_after) = each(%repos)) {
      if (-e "$repo/.svn") {
+         print "Checking [$repo]\n";
          system('svn',
                 $command,
                 $options{quiet}?'-q':(),
-                $options{quick}?('--ignore-externals','-N'):(),
+                ($options{quick} and $CAN_IGNORE_EXTERNALS)?'--ignore-externals':(),
+                $options{quick}>1?'-N':(),
                 $repo,
                );
      }