8 # This subroutine finds any non-authorized writable files in a passed directory
14 # found a directory entry
16 # prune the directory if it's one we want to ignore
20 $File::Find
::prune
= 1;
24 { if (!m/^.*(aps|ncb|opt|plg)$/)
26 print "n $File::Find::name\n";
27 print Logfile
"n $File::Find::name\n";
30 } # End of sub Find_Writable
34 ########## MAIN ##########
37 $gmcdaniel = "gmcdaniel\@soe.sony.com";
41 # Check for any non-authorized writable files in the /swg/current/src directory and email the results
43 $writable_files_log = "WritableFiles.log";
45 print ("Checking for writable files...\n");
46 open (Logfile
, ">c:\\buildlogs\\$writable_files_log") || die "Sorry, I couldn't create $writable_files_log";
47 print Logfile
"The writable files that were found:\n";
50 $search_path = "..\\src";
51 @ARGV = ($search_path);
52 find
(\
&Find_Writable
, @ARGV);
56 $writable_test_time_and_date = get_time_and_date
();
57 $date_stamp = get_date
();
58 system ("copy c:\\buildlogs\\$writable_files_log c:\\buildlogs\\WritableFiles_$writable_test_time_and_date.log");
59 print ("Checking for writable files completed\n");
62 system ("postie -host:mail-sd.station.sony.com -to:$gmcdaniel -from:$gmcdaniel -s:\"Writable Files Results $date_stamp\" -nomsg -file:c:\\buildlogs\\WritableFiles_$writable_test_time_and_date.log");
65 ## End of Check for any non-authorized writable files in the /swg/current/src directory and email the results
70 ########## END OF MAIN ##########