[Rt-commit] rt branch, 4.0/customize-upgrade-wording, created. rt-4.0.13-53-gff33719

Kevin Falcone falcone at bestpractical.com
Fri Jun 7 18:39:49 EDT 2013


The branch, 4.0/customize-upgrade-wording has been created
        at  ff337192b0430d90c63aba88d021dcc98a43a0c1 (commit)

- Log -----------------------------------------------------------------
commit ff337192b0430d90c63aba88d021dcc98a43a0c1
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Jun 7 15:23:33 2013 -0400

    Allow an extension to use --action upgrade with different wording
    
    This allows RTIR to use the magic version-parsing code and friendly
    wording without it confusingly asking for your RT version.

diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index f4beb2c..538b374 100644
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -83,12 +83,13 @@ $| = 1; # unbuffer all output.
 
 my %args = (
     dba => '@DB_DBA@',
+    product => 'RT',
 );
 GetOptions(
     \%args,
     'action=s',
     'force', 'debug',
-    'dba=s', 'dba-password=s', 'prompt-for-dba-password',
+    'dba=s', 'dba-password=s', 'prompt-for-dba-password', 'product=s',
     'datafile=s', 'datadir=s', 'skip-create', 'root-password-file=s',
     'help|h',
 );
@@ -312,7 +313,7 @@ sub action_upgrade {
         if ( defined $upgrading_from ) {
             print "Doesn't match #.#.#: ";
         } else {
-            print "Enter RT version you're upgrading from: ";
+            print "Enter $args{product} version you're upgrading from: ";
         }
         $upgrading_from = scalar <STDIN>;
         chomp $upgrading_from;
@@ -345,7 +346,7 @@ sub action_upgrade {
             if ( defined $custom_upgrading_to ) {
                 print "Doesn't match #.#.#: ";
             } else {
-                print "\nEnter RT version if you want to stop upgrade at some point,\n";
+                print "\nEnter $args{product} version if you want to stop upgrade at some point,\n";
                 print "  or leave it blank if you want apply above upgrades: ";
             }
             $custom_upgrading_to = scalar <STDIN>;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list