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);
+ "-rf", &canonicalize($target_file), @excludes,
+ "--files-from=" . &canonicalize($temp_file);
if ($outcome) {
unlink($temp_file);
die("failure to archive");
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;
+ @extra_flags, "-rf", &canonicalize($target_file), @excludes, $i;
if ($outcome) { die("failure to archive"); }
}
chdir("$currdir");
#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)
+ open(TARPROC, "$tar_tool --delete -f " . &canonicalize($target_file)
. " \"$pattern\" 2>$null_log |");
<TARPROC>;
}
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);
+ &canonicalize($target_file), &canonicalize($number_file);
if ($outcome) { die("failure to archive"); }
local($prefix_file) = "prefix.bac";
close(NUM_PREFIX);
$outcome = 0xff & system $tar_tool, "-rf",
- &msys_canonicalize($target_file), &msys_canonicalize($prefix_file);
+ &canonicalize($target_file), &canonicalize($prefix_file);
if ($outcome) { die("failure to archive"); }
unlink($prefix_file);
chdir($currdir);
$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);
+ &canonicalize($filename);
if ($outcome) { die("failure to undo archive"); }
local($outcome) =
fi
export IS_DARWIN=$(echo $OSTYPE | grep -i darwin)
+ ##############
+
+ # guess the current platform.
+ IS_UNIX=$(uname | grep -i linux)
+ if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i unix); fi
+ if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i darwin); fi
+ IS_DOS=$(uname | grep -i ming)
+ if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
+
+ # now if we're stuck in DOS, try to determine the type of system.
+ if [ ! -z "$IS_DOS" ]; then
+ # IS_MSYS will be non-empty if this is the msys toolset. otherwise
+ # we assume that it's cygwin.
+ IS_MSYS=$(uname | grep -i ming)
+ fi
+
##############
# fallbacks to set crucial variables for feisty meow...
# version of the License. Please send any updates to "fred@gruntose.com". #
###############################################################################
-use Env qw(OS);
+use Env qw(OS IS_MSYS);
############################################################################
return &canonicalizer(@_, "/");
}
-# similar to the normal unix version, but supports msys's weird paths.
-sub msys_canonicalize {
- return &canonicalizer(@_, "/", 1);
-}
-
-# similar to the msys version, but services cygwin.
-sub cygwin_canonicalize {
- return &canonicalizer(@_, "/", 2);
-}
-
-
# this more general routine gets a directory separator passed in. it then
# replaces all the separators with that one.
-
sub canonicalizer {
local($directory_name) = $_[0];
local($dirsep) = $_[1];
- local($do_funky) = $_[2];
-#print "do funky is set to \"$do_funky\"\n";
#print "old dir name is \"$directory_name\"\n";
if ($OS =~ /win/i) {
#somewhat abbreviated check; only catches windoze systems, not dos or os2.
- if ($do_funky eq "1") {
+ # IS_MSYS is calculated by feisty meow scripts startup; it will be
+ # non-empty if this is the msys tool kit.
+ if (length($IS_MSYS) > 0) {
# msys utilities version (http://www.mingw.org)
$directory_name =~ s/^(.):[\\\/](.*)$/\/\1\/\2/;
- } elsif ($do_funky eq "2") {
+ } else {
# cygwin utilities version (http://www.cygwin.com)
$directory_name =~ s/^(.):[\\\/](.*)$/\/cygdrive\/\1\/\2/;
}
export BUILDER_DIR="$BUILDING_HIERARCHY"
# guess the current platform.
-IS_UNIX=$(uname | grep -i linux)
-if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i unix); fi
-if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i darwin); fi
-IS_DOS=$(uname | grep -i ming)
-if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
+#IS_UNIX=$(uname | grep -i linux)
+#if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i unix); fi
+#if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i darwin); fi
+#IS_DOS=$(uname | grep -i ming)
+#if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
# set some clam parameters for compilation. if the script can't guess the
# right configuration, then you will need to set them in the last 'else'