[gnumeric] grand-rename: make the actual change the default.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] grand-rename: make the actual change the default.
- Date: Mon, 2 Mar 2015 16:05:14 +0000 (UTC)
commit e5508d241dcb7b7d22636581b07a891140d4997a
Author: Morten Welinder <terra gnome org>
Date: Mon Mar 2 11:04:48 2015 -0500
grand-rename: make the actual change the default.
tools/grand-rename | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/tools/grand-rename b/tools/grand-rename
index 08c0548..b067250 100644
--- a/tools/grand-rename
+++ b/tools/grand-rename
@@ -8,7 +8,19 @@ die "$0: must be run from top-level directory.\n"
-r 'ChangeLog' &&
-r 'po/POTFILES.in');
-my $doit = ($ARGV[0] && $ARGV[0] =~ /^--doit/ && shift);
+my $test = 1;
+my $doit = 1;
+
+while (@ARGV > 0) {
+ if ($ARGV[0] =~ /^--doit/) {
+ # Nothing -- this is now the default
+ } elsif ($ARGV[0] =~ /^--test/) {
+ $doit = 0;
+ } else {
+ last;
+ }
+}
+
my $oldname = $ARGV[0];
my $newname = $ARGV[1];
@@ -27,7 +39,9 @@ die "$0: oldname and newname must be different\n" if $oldname eq $newname;
my @files = &find_files ();
-&do_files (\ files, 1);
+if ($test) {
+ &do_files (\ files, 1);
+}
if ($doit) {
print STDERR "Renaming $oldname to $newname\n";
&do_files (\ files, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]