projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b680387
)
renamed a variable to be more meaningful.
author
Chris Koeritz
<fred@gruntose.com>
Thu, 19 Mar 2015 21:33:49 +0000
(17:33 -0400)
committer
Chris Koeritz
<fred@gruntose.com>
Thu, 19 Mar 2015 21:33:49 +0000
(17:33 -0400)
scripts/files/safedel.pl
patch
|
blob
|
history
diff --git
a/scripts/files/safedel.pl
b/scripts/files/safedel.pl
index c95e6621f8671d45cbf7387d772ac3179f565848..e9de40461035bbfad2eb6c6e6dd2f48a81a14cfc 100644
(file)
--- a/
scripts/files/safedel.pl
+++ b/
scripts/files/safedel.pl
@@
-107,14
+107,14
@@
sub safedel {
$date_tool = "date";
local($datestamp) = `$date_tool +%Y-%m-%d-%H%M`;
while ($datestamp =~ /[\r\n]$/) { chop $datestamp; }
$date_tool = "date";
local($datestamp) = `$date_tool +%Y-%m-%d-%H%M`;
while ($datestamp =~ /[\r\n]$/) { chop $datestamp; }
- $
temp
file = $temp_subdir . "/deleted-#$number-" . $datestamp;
-#print "
tempfile is $temp
file; file is $file.\n";
+ $
archive_
file = $temp_subdir . "/deleted-#$number-" . $datestamp;
+#print "
archive_file is $archive_
file; file is $file.\n";
if (-d $file) {
# ensure there aren't any read only files.
system("chmod -R u+rw \"$file\"");
# store the directory in the trash storage.
if (-d $file) {
# ensure there aren't any read only files.
system("chmod -R u+rw \"$file\"");
# store the directory in the trash storage.
- system("$zip -rm $use_path $
temp
file \"$file$wildcard\" $DEV_NULL");
+ system("$zip -rm $use_path $
archive_
file \"$file$wildcard\" $DEV_NULL");
# zip up the files into the safekeeper directory.
# recursively unlink in case zip doesn't remove the empty dir.
if (-d $file) {
# zip up the files into the safekeeper directory.
# recursively unlink in case zip doesn't remove the empty dir.
if (-d $file) {
@@
-126,8
+126,8
@@
sub safedel {
# store the file in the trash storage.
system("chmod u+rw \"$file\"");
# store the file in the trash storage.
system("chmod u+rw \"$file\"");
-#print "about to run: system [$zip -m$use_path $
temp
file '$file' $DEV_NULL]";
- system("$zip -m$use_path $
temp
file \"$file\" $DEV_NULL");
+#print "about to run: system [$zip -m$use_path $
archive_
file '$file' $DEV_NULL]";
+ system("$zip -m$use_path $
archive_
file \"$file\" $DEV_NULL");
push(@deleted, "\"$file\"");
} else {
print "$0 cannot find \"$file\" to delete it.\n";
push(@deleted, "\"$file\"");
} else {
print "$0 cannot find \"$file\" to delete it.\n";
@@
-140,7
+140,7
@@
sub safedel {
local($printable_date) = scalar(localtime());
#&ctime(time);
$printable_date =~ s/\n//g;
local($printable_date) = scalar(localtime());
#&ctime(time);
$printable_date =~ s/\n//g;
- local($just_archived_filename) = `basename "$
temp
file"`;
+ local($just_archived_filename) = `basename "$
archive_
file"`;
while ($just_archived_filename =~ /[\r\n]$/) { chop $just_archived_filename; }
print REPORT "\n";
print REPORT $printable_date . " -- created \"" . $just_archived_filename . ".zip\"\n";
while ($just_archived_filename =~ /[\r\n]$/) { chop $just_archived_filename; }
print REPORT "\n";
print REPORT $printable_date . " -- created \"" . $just_archived_filename . ".zip\"\n";