From: Jason Etheridge Date: Fri, 10 Apr 2020 18:13:08 +0000 (-0400) Subject: let's not name these differently than the emig.d/ counterparts X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=483f7fb67b65840e55be6a04d64dc34c0e0ef87e let's not name these differently than the emig.d/ counterparts --- diff --git a/kmig.d/bin/kmig-add b/kmig.d/bin/mig-add similarity index 92% rename from kmig.d/bin/kmig-add rename to kmig.d/bin/mig-add index 3538e9f..ff4422b 100755 --- a/kmig.d/bin/kmig-add +++ b/kmig.d/bin/mig-add @@ -4,7 +4,7 @@ =head1 NAME -kmig-add - This will add the specified files to the mig tracking table +mig-add - This will add the specified files to the mig tracking table --headers (the default) and --no-headers are repeatable, and indicate whether subsequent files have headers or not @@ -14,11 +14,11 @@ the next added , which should contain one line per header --headers-file will automatically invoke --no-headers -You'll need to invoke B prior to using commands like B +You'll need to invoke B prior to using commands like B =head1 SYNOPSIS -B [--no-headers|--headers|--headers-file ] [file|--no-headers|--headers|--headers-file ] [...] +B [--no-headers|--headers|--headers-file ] [file|--no-headers|--headers|--headers-file ] [...] =cut diff --git a/kmig.d/bin/kmig-clean b/kmig.d/bin/mig-clean similarity index 92% rename from kmig.d/bin/kmig-clean rename to kmig.d/bin/mig-clean index 39522d6..705fd96 100755 --- a/kmig.d/bin/kmig-clean +++ b/kmig.d/bin/mig-clean @@ -4,7 +4,7 @@ =head1 NAME -kmig-clean +mig-clean Attempts to invoke B on the specified tracked file, placing the output in [file].clean @@ -25,12 +25,12 @@ clean_csv [other arguments...] =back -You'll need to invoke B or B prior to using commands -like B +You'll need to invoke B or B prior to using commands +like B =head1 SYNOPSIS -B [other arguments...] +B [other arguments...] =cut @@ -75,7 +75,7 @@ sub call_clean_csv { my $data = KMig::status_this_file($file); if (! $data->{'utf8_filename'}) { - die "kmig-iconv or kmig-skip-iconv needed for UTF8 version of file: $file\n"; + die "mig-iconv or mig-skip-iconv needed for UTF8 version of file: $file\n"; } my $utf8_file = $data->{'utf8_filename'}; diff --git a/kmig.d/bin/kmig-env b/kmig.d/bin/mig-env similarity index 90% rename from kmig.d/bin/kmig-env rename to kmig.d/bin/mig-env index fce49bc..a8b5329 100755 --- a/kmig.d/bin/kmig-env +++ b/kmig.d/bin/mig-env @@ -4,25 +4,25 @@ =head1 NAME -kmig-env - This tool is for tracking and setting environment variables used by -B and its sub-tools. +mig-env - This tool is for tracking and setting environment variables used by +B and its sub-tools. =head1 SYNOPSIS -B +B -B [migration_schema] +B [migration_schema] -B [orig_migration_schema] [new_migration_schema] +B [orig_migration_schema] [new_migration_schema] -B +B -B +B =head1 DESCRIPTION -For most invocations, B will either create or use a migration-specific -file (~/.kmig/.env) for setting the following environment +For most invocations, B will either create or use a migration-specific +file (~/.mig/.env) for setting the following environment variables: =over 15 @@ -79,12 +79,12 @@ and migration work directory (which will also be created if needed). =item B This command will spawn a bash shell that executes the corresponding -~/.kmig/.env script for setting up environment variables encoded during +~/.mig/.env script for setting up environment variables encoded during B. =item B [schema] -This command will show the contents of the corresponding ~/.kmig/.env +This command will show the contents of the corresponding ~/.mig/.env script, or, if no schema is specified, then it will list pertinent variables in the current environment if they exist. @@ -98,7 +98,7 @@ separate schema name. =item B -This command will list migration schemas found in ~/.kmig +This command will list migration schemas found in ~/.mig =item B @@ -126,7 +126,7 @@ use lib "$FindBin::Bin/"; pod2usage(-verbose => 2) if ! $ARGV[0]; my $migration_schema = $ARGV[1] || ''; -my $filename = "$HOME/.kmig/$migration_schema.env"; +my $filename = "$HOME/.mig/$migration_schema.env"; switch($ARGV[0]) { case "--help" { pod2usage(-verbose => 2); @@ -141,7 +141,7 @@ switch($ARGV[0]) { case "clone" { pod2usage(-verbose => 1) if ! $ARGV[2]; $migration_schema = $ARGV[2] || ''; - $filename = "$HOME/.kmig/$migration_schema.env"; + $filename = "$HOME/.mig/$migration_schema.env"; mig_env_clone(); } case "use" { @@ -160,7 +160,7 @@ switch($ARGV[0]) { } } case "list" { - opendir(my $dh, "$HOME/.kmig") || die "can't open $HOME/.kmig: $!"; + opendir(my $dh, "$HOME/.mig") || die "can't open $HOME/.mig: $!"; while (readdir $dh) { if (/^(.*)\.env$/) { print "$1\n"; @@ -260,7 +260,7 @@ sub mig_env_create { # create files and directories if needed - mkdir "$HOME/.kmig"; + mkdir "$HOME/.mig"; make_path($MIGGITDIR, { verbose => 1 }); `touch $MIGGITDIR/README`; make_path($MIGWORKDIR, { verbose => 1 }); diff --git a/kmig.d/bin/kmig-iconv b/kmig.d/bin/mig-iconv similarity index 94% rename from kmig.d/bin/kmig-iconv rename to kmig.d/bin/mig-iconv index 455e91a..c2552a5 100755 --- a/kmig.d/bin/kmig-iconv +++ b/kmig.d/bin/mig-iconv @@ -4,7 +4,7 @@ =head1 NAME -kmig-iconv +mig-iconv Attempts to invoke B on the specified tracked file, placing the output in [file].iconv @@ -25,11 +25,11 @@ iconv [other arguments...] -o .utf8 =back -You'll need to invoke B prior to using commands like B +You'll need to invoke B prior to using commands like B =head1 SYNOPSIS -B [other arguments...] +B [other arguments...] =cut diff --git a/kmig.d/bin/kmig-init b/kmig.d/bin/mig-init similarity index 76% rename from kmig.d/bin/kmig-init rename to kmig.d/bin/mig-init index 7557168..8b207f8 100755 --- a/kmig.d/bin/kmig-init +++ b/kmig.d/bin/mig-init @@ -4,17 +4,17 @@ =head1 NAME -kmig-init - This will add or recreate tracking tables for the B toolset -to the database specified by the current kmig environment. +mig-init - This will add or recreate tracking tables for the B toolset +to the database specified by the current mig environment. -In practice, you should invoke 'kmig env use schema_name' prior to calling +In practice, you should invoke 'mig env use schema_name' prior to calling B =head1 SYNOPSIS -B +B -B +B =cut @@ -51,14 +51,14 @@ exit 0; ############################################################################### sub loop_through_mig_sql_templates { - print "Looping through kmig.d/sql/init/ templates\n"; + print "Looping through mig.d/sql/init/ templates\n"; opendir my $dir, $mig_sql or die "Cannot open directory: $!"; my @files = sort readdir $dir; closedir $dir; foreach my $file (@files) { if ($file =~ /.sql$/) { print "executing $file:\n"; - system( $mig_bin . "kmig-sql", ('-e',"source $mig_sql$file") ) + system( $mig_bin . "mig-sql", ('-e',"source $mig_sql$file") ) } } } diff --git a/kmig.d/bin/kmig-remove b/kmig.d/bin/mig-remove similarity index 88% rename from kmig.d/bin/kmig-remove rename to kmig.d/bin/mig-remove index 0ea81d8..2b625a2 100755 --- a/kmig.d/bin/kmig-remove +++ b/kmig.d/bin/mig-remove @@ -4,13 +4,13 @@ =head1 NAME -kmig-remove - This will remove the specified files from the mig tracking table +mig-remove - This will remove the specified files from the mig tracking table -You'll need to invoke B prior to using commands like B +You'll need to invoke B prior to using commands like B =head1 SYNOPSIS -B [file] [...] +B [file] [...] =cut diff --git a/kmig.d/bin/kmig-skip-iconv b/kmig.d/bin/mig-skip-iconv similarity index 97% rename from kmig.d/bin/kmig-skip-iconv rename to kmig.d/bin/mig-skip-iconv index c720256..db9c378 100755 --- a/kmig.d/bin/kmig-skip-iconv +++ b/kmig.d/bin/mig-skip-iconv @@ -4,14 +4,14 @@ =head1 NAME -kmig-skip-iconv +mig-skip-iconv Allows you to either use an existing file named .utf8 or a named [utf8 file] as if it were the one created by mig-iconv =head1 SYNOPSIS -B [utf8 file] +B [utf8 file] =cut diff --git a/kmig.d/bin/kmig-sql b/kmig.d/bin/mig-sql similarity index 98% rename from kmig.d/bin/kmig-sql rename to kmig.d/bin/mig-sql index 161dacd..993826b 100755 --- a/kmig.d/bin/kmig-sql +++ b/kmig.d/bin/mig-sql @@ -4,7 +4,7 @@ =head1 NAME -kmig-sql +mig-sql A wrapper around the mysql client. diff --git a/kmig.d/bin/kmig-status b/kmig.d/bin/mig-status similarity index 91% rename from kmig.d/bin/kmig-status rename to kmig.d/bin/mig-status index b5ca53b..fe5a029 100755 --- a/kmig.d/bin/kmig-status +++ b/kmig.d/bin/mig-status @@ -4,14 +4,14 @@ =head1 NAME -kmig-status - This will show tracking information for either the specified files +mig-status - This will show tracking information for either the specified files or all tracked files if no argument is given. -You'll need to invoke B prior to using commands like B +You'll need to invoke B prior to using commands like B =head1 SYNOPSIS -B [file] [...] +B [file] [...] =cut