X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=kmig.d%2Fbin%2Fmig-env;fp=kmig.d%2Fbin%2Fkmig-env;h=a8b5329442eabb83e55f1be80320c88b4a32a82e;hp=fce49bc7e0f9df470c0c634af481732349cdcc81;hb=483f7fb67b65840e55be6a04d64dc34c0e0ef87e;hpb=155eb9eac077ca803f75d1295e584e7012e1b883 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 });