Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
forge001
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
forge001
Commits
988e9f76
Commit
988e9f76
authored
8 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
copied md5cat.pm from sourceforge repository
parent
36efb863
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
textarchive/lib/md5cat.pm
+26
-3
26 additions, 3 deletions
textarchive/lib/md5cat.pm
with
26 additions
and
3 deletions
textarchive/lib/md5cat.pm
+
26
−
3
View file @
988e9f76
...
...
@@ -28,6 +28,11 @@ use Digest::MD5::File;
my
$run
=
1
;
sub
run
{
$run
;
}
my
$mark_count1
=
10000
;
my
$mark_count2
=
1000
;
my
$mark_time
=
600
;
# seconds
my
$last_mark
=
0
;
# epoch
sub
new
{
my
$class
=
shift
;
...
...
@@ -242,7 +247,6 @@ sub check_new_files
{
last
FILE
if
(
defined
(
$limit
)
&&
@tmp_2chk
>=
$limit
);
printf
("
%9d items processed
\n
",
$cnt
)
if
((
++
$cnt
%
10000
)
==
0
);
my
$F
=
$xFLIST
->
{
$fnm
};
my
$x
=
$F
->
{'
state
'};
next
if
(
$x
eq
'
nocheck
');
...
...
@@ -266,7 +270,18 @@ sub check_new_files
{
push
(
@tmp_2chk
,
$fnm
);
}
$cnt
++
;
if
((
$mark_count1
&&
(
$cnt
%
$mark_count1
)
==
0
)
||
(
$mark_time
&&
time
()
>
$last_mark
+
$mark_time
)
)
{
$last_mark
=
time
();
printf
("
%9d items processed
\n
",
$cnt
);
}
}
printf
("
%9d files to be checked
\n
",
scalar
(
@tmp_2chk
));
if
(
@tmp_2chk
)
...
...
@@ -539,8 +554,6 @@ sub digest_md5_list
my
$cnt
=
0
;
MD5:
while
(
my
$f
=
shift
(
@
_
))
{
printf
("
%9d items processed
\n
",
$cnt
)
if
((
++
$cnt
%
10000
)
==
0
);
last
MD5
unless
(
$run
);
my
@st
=
stat
(
$f
);
...
...
@@ -553,6 +566,16 @@ sub digest_md5_list
my
$md5
=
Digest::MD5::File::
file_md5_hex
(
$f
);
printf
("
%9d %s %s
\n
",
$st
[
7
],
$md5
,
$f
);
push
(
@res
,
[
$md5
,
$f
,
$st
[
7
],
$st
[
9
]
]);
$cnt
++
;
if
((
$mark_count2
&&
(
$cnt
%
$mark_count2
)
==
0
)
||
(
$mark_time
&&
time
()
>
$last_mark
+
$mark_time
)
)
{
$last_mark
=
time
();
printf
("
%9d items processed
\n
",
$cnt
);
}
}
(
wantarray
)
?
@res
:
\
@res
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment