X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Ffiles%2Ffilename_helper.pl;h=318e5829dbf6ec629416b3b9737abf4018c07e04;hb=6b3e90f782c845f3b6d4ea7e9607c2f98de9b8ef;hp=531dfa51c6b6522c4f21f509dbcd514937b4a104;hpb=2cc6bf514ccde007ac328907f1cf124295fb92f2;p=feisty_meow.git diff --git a/scripts/files/filename_helper.pl b/scripts/files/filename_helper.pl index 531dfa51..318e5829 100644 --- a/scripts/files/filename_helper.pl +++ b/scripts/files/filename_helper.pl @@ -324,12 +324,8 @@ sub important_filename { # these are endings that we consider unimportant. where a caret is used # at the front, we will match only the whole string. double slashes are # used before periods to ensure we match a real period character. - -# "AssemblyInfo.c.*", -#need to regenerate these automatically. - local(@junk_files) = ("~", "^\\.#.*", "^\\._.*", "\\.aps", "\\.bak", - "^binaries", + "^binaries", "\\.clw", "^cpdiff_tmp\\.txt", "^\\.ds_store", "^diffs\\.txt", "^diff_tmp\\.txt", "\\.dsp", "\\.dsw", "\\.gid", "gmon\\.out", "\\.isr", "^isconfig\\.ini", "\\.log", "^manifest.txt", "^obj", @@ -337,10 +333,8 @@ sub important_filename { "\\.sbr", ".*scc", "^Setup\\.dbg", "^Setup\\.inx", "^Setup\\.map", "^Setup\\.obs", "^Selenium_.*Login.html", "\\.stackdump", "^string1033\\.txt", "\\.suo", "\\.swp", - "^thumbs.db", "\\.tmp", "^trans\\.tbl", "\\.user", "_version\\.h", + "^thumbs.db", "[a-zA-Z0-9]\\.tmp", "^trans\\.tbl", "\\.user", "_version\\.h", "_version\\.rc", "^waste", "\\.ws4", "\\.wsm"); -#this whacks too much. what was it for? -#"^generated_.*", foreach $temp (@junk_files) { $temp = $temp . '$'; @@ -400,9 +394,16 @@ sub upper { # recursively deletes a directory that is passed as the single parameter. # from http://developer.novell.com/wiki/index.php/Recursive_Directory_Remove sub recursive_delete { + +#hmmm: this should iterate across all params. my $dir = shift; - local *DIR; + if ( -f "$dir" ) { +print "this is not a dir: $dir\nshould whack it here?\n"; +return; + } + + local *DIR; opendir DIR, $dir or die "opendir $dir: $!"; my $found = 0; while ($_ = readdir DIR) {