X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Ftext%2Fdiff_lib.pl;h=158f205caf8caab170ed228bf03f3025493710c1;hb=refs%2Fheads%2Fmain;hp=c0ffaf7a1e88dec7c6c4e864eb4a1cb734b3a2b7;hpb=2dc7262979a054eeb1167aa60546365f1da812e1;p=feisty_meow.git diff --git a/scripts/text/diff_lib.pl b/scripts/text/diff_lib.pl index c0ffaf7a..158f205c 100644 --- a/scripts/text/diff_lib.pl +++ b/scripts/text/diff_lib.pl @@ -23,9 +23,9 @@ # support from CPAN. this can be installed by using cpan and telling it # install Text::Diff -require "ctime.pl"; require "filename_helper.pl"; -require "importenv.pl"; + +use Env qw(FEISTY_MEOW_APEX); use Text::Diff; @@ -71,12 +71,12 @@ sub diff_dirs { &differ_instructions; return; } - if (-l $compare_directory) { - # we will not operate on links, due to recursion issues. -## &differ_instructions; - print "skipping link: $compare_directory\n"; - return; - } +# if (-l $compare_directory) { +# # we will not operate on links, due to recursion issues. +### &differ_instructions; +# print "skipping link: $compare_directory\n"; +# return; +# } if (! -d $compare_directory) { # a missing directory is just not good. print "skipping missing directory: $compare_directory\n"; @@ -90,12 +90,12 @@ sub diff_dirs { $source_directory = $arguments[1]; } $source_directory = &sanitize_name($source_directory); - if (-l $source_directory) { - # we will not operate on links, due to recursion issues. -# &differ_instructions; - print "skipping link: $source_directory\n"; - return; - } +# if (-l $source_directory) { +# # we will not operate on links, due to recursion issues. +## &differ_instructions; +# print "skipping link: $source_directory\n"; +# return; +# } if (! -d $source_directory) { # a missing directory is just not good. print "skipping missing directory: $source_directory\n"; @@ -119,7 +119,7 @@ sub diff_dirs { @name_components = split(/\//, $filename); $basename = $name_components[$#name_components]; # print "doing diff of $filename against $compare_directory/$basename\n"; - &do_diff($filename, $compare_directory."/".$basename); + &compute_file_differences($filename, $compare_directory."/".$basename); } closedir CURDIR; @@ -146,7 +146,7 @@ sub print_header { # this function prints out the header prior to printing out any real # data. if there are no diffs, the header should never get printed. print "$break_line\n"; - local($printable_date) = &ctime(time); + local($printable_date) = scalar(localtime()); $printable_date =~ s/\n//g; print "[$printable_date]\n"; print "Left (<) is \"$temp_src\".\n"; @@ -164,10 +164,10 @@ This program needs a directory name. The directory name is used to specify a target directory where there are files which are mostly similar to the files in this directory. The files in the current directory are compared to those in the specified target directory and the differences -are sent to the standard output. Note that neither directory may be -a symbolic link, as that can lead to crazy recursion. +are sent to the standard output. "; } +#Note that neither directory may be a symbolic link, as that can lead to crazy recursion. ############################################################################ @@ -191,7 +191,7 @@ synch_build: This program needs one directory name to be passed on the command line. This directory is where the installation's executable files live. Any files that are in the installation bin directory will be compared against the files -in the build repository (specified by an environment variable FEISTY_MEOW_DIR). +in the build repository (specified by an environment variable FEISTY_MEOW_APEX). If files differ, they will be copied from the repository into the installation directory. "; @@ -222,7 +222,7 @@ sub change_to_saw_same { # checks the differences between the two files and creates appropriate output. -sub do_diff { +sub compute_file_differences { local($first, $second) = @_; # turn stupid pc slashes into normal ones. @@ -378,11 +378,11 @@ sub copy_diff_dirs { &cpdiff_instructions; return; } - if (-l $source_directory) { - # we will not operate on links, due to recursion issues. - &cpdiff_instructions; - return; - } +# if (-l $source_directory) { +# # we will not operate on links, due to recursion issues. +# &cpdiff_instructions; +# return; +# } # get the comparison directory from the arguments. local($compare_directory) = &sanitize_name($arguments[1]); @@ -391,11 +391,11 @@ sub copy_diff_dirs { &cpdiff_instructions; return; } - if (-l $compare_directory) { - # we will not operate on links, due to recursion issues. - &cpdiff_instructions; - return; - } +# if (-l $compare_directory) { +# # we will not operate on links, due to recursion issues. +# &cpdiff_instructions; +# return; +# } # print "src=$source_directory, dest=$compare_directory\n"; @@ -490,12 +490,12 @@ sub synchronize_against_build } # print "install=$install_directory\n"; -# print "repos=$FEISTY_MEOW_DIR\n"; +# print "repos=$FEISTY_MEOW_APEX\n"; # iterate over all the files in the source directory. opendir CURDIR, $install_directory || die("couldn't open $install_directory for reading.\n"); - $compare_directory = "$FEISTY_MEOW_DIR/dll"; + $compare_directory = "$FEISTY_MEOW_APEX/dll"; foreach $filename (readdir CURDIR) { if ( ($filename eq ".") || ($filename eq "..") ) { next; } if (! ($filename =~ /\.dll$/)) { next; } @@ -514,7 +514,7 @@ sub synchronize_against_build # repeat for the exe directory. opendir CURDIR, $install_directory || die("couldn't open $install_directory for reading.\n"); - $compare_directory = "$FEISTY_MEOW_DIR/exe"; + $compare_directory = "$FEISTY_MEOW_APEX/exe"; foreach $filename (readdir CURDIR) { if ( ($filename eq ".") || ($filename eq "..") ) { next; } if (! ($filename =~ /\.exe$/)) { next; }