X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Farchival%2Fshared_snarfer.pl;h=9edc41427297fde85a2349f197ca938c2d1e420a;hb=29746c292d1930d85aeca1fb89f6d9e317303c0e;hp=fc6c4f3cb6564ec7f4a32153e94e41832b35a8a6;hpb=c771d8f672e6f980d22c81be9df126f0574388d5;p=feisty_meow.git diff --git a/scripts/archival/shared_snarfer.pl b/scripts/archival/shared_snarfer.pl index fc6c4f3c..9edc4142 100644 --- a/scripts/archival/shared_snarfer.pl +++ b/scripts/archival/shared_snarfer.pl @@ -28,15 +28,7 @@ require "inc_num.pl"; use Cwd; use File::Which; -#hmmm: maybe move this to a utility script file. $null_log = "/dev/null"; -#hmmm: move especially this check to a script file, and recast anything -# referring to Windows_NT to it. -if ( ("$OS" =~ /[wW][iI][nN]/) || ("$OS" =~ /[Oo][Ss]2/) - || ("$OS" =~ /[Dd][Oo][Ss]/) ) { - $null_log = "nul" -} -#print "nul log=$null_log \n"; $TMP =~ s/\\/\//g; # fix the temp variable for ms-winders. @@ -93,10 +85,10 @@ sub snarf_prefix { local($base) = @_; $date_tool = "date"; - if ($OS =~ /win/i) { - # just hope that this is running under msys in our build bin. - $date_tool = "$PRODUCTION_DIR/msys/bin/date"; - } +# if ($OS =~ /win/i) { +# # just hope that this is running under msys in our build bin. +# $date_tool = "$PRODUCTION_DIR/msys/bin/date"; +# } local($date_part) = `$date_tool +%Y-%m-%d-%H%M`; while ($date_part =~ /[\r\n]$/) { chop $date_part; } @@ -192,6 +184,7 @@ sub snarfer { push(@missing_log, $base); } +print "snarfer function assumes msys canonicalization is appropriate--not cygwin compat.\n"; local($outcome) = 0xff & system $tar_tool, "-rf", &msys_canonicalize($target_file), @excludes, "--files-from=" . &msys_canonicalize($temp_file); @@ -231,6 +224,7 @@ sub snarf_file_list { if ($i =~ /^\.\//) { $i = substr $i, 2, length($i) - 2; } +print "snarf_file_list function assumes msys canonicalization is appropriate--not cygwin compat.\n"; local($outcome) = 0xff & system $tar_tool, #"--directory=" . "$root", @extra_flags, "-rf", &msys_canonicalize($target_file), @excludes, $i; @@ -269,6 +263,7 @@ sub remove_from_backup { #print "remove_from_backup: pref=$prefix, num=$number, patt=$pattern,\n"; local($target_file) = &snarf_name($prefix, $number); +print "remove_from_backup function assumes msys canonicalization is appropriate--not cygwin compat.\n"; open(TARPROC, "$tar_tool --delete -f " . &msys_canonicalize($target_file) . " \"$pattern\" 2>$null_log |"); ; @@ -381,6 +376,7 @@ sub backup_number { local($currdir) = cwd(); chdir($TMP); +print "backup_number function assumes msys canonicalization is appropriate--not cygwin compat.\n"; local($outcome) = 0xff & system $tar_tool, "-cf", &msys_canonicalize($target_file), &msys_canonicalize($number_file); if ($outcome) { die("failure to archive"); } @@ -459,6 +455,7 @@ sub restore_archive { $filename = "../" . $filename; } +print "restore_archive function assumes msys canonicalization is appropriate--not cygwin compat.\n"; local($outcome) = 0xff & system $tar_tool, "-xzf", &msys_canonicalize($filename); if ($outcome) { die("failure to undo archive"); }