Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
md5cat
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
md5cat
Commits
02fcd59d
Commit
02fcd59d
authored
Dec 27, 2021
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
added commandline flags, esp. --doit option
parent
83177fc0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
md5cat/xmd5.pl
+43
-2
43 additions, 2 deletions
md5cat/xmd5.pl
with
43 additions
and
2 deletions
md5cat/xmd5.pl
+
43
−
2
View file @
02fcd59d
...
@@ -38,6 +38,39 @@ use strict;
...
@@ -38,6 +38,39 @@ use strict;
use
Data::
Dumper
;
use
Data::
Dumper
;
$
Data::Dumper::
Indent
=
1
;
$
Data::Dumper::
Indent
=
1
;
my
$doit
=
0
;
my
$quiet
=
0
;
my
@PARS
;
my
$arg
;
while
(
defined
(
$arg
=
shift
(
@ARGV
)))
{
if
(
$arg
eq
'
--
')
{
push
(
@PARS
,
@ARGV
);
@ARGV
=
();
}
elsif
(
$arg
eq
'
-
')
{
push
(
@PARS
,
'
-
');
}
elsif
(
$arg
=~
/^--(.+)/
)
{
my
(
$opt
,
$val
)
=
split
('
=
',
$
1
,
2
);
if
(
$opt
eq
'
help
')
{
usage
();
}
elsif
(
$opt
eq
'
doit
')
{
$doit
=
1
;
}
elsif
(
$opt
eq
'
quiet
')
{
$quiet
=
1
;
}
else
{
usage
();
}
}
elsif
(
$arg
=~
/^-(.+)/
)
{
foreach
my
$opt
(
split
('',
$
1
))
{
if
(
$opt
eq
'
h
')
{
usage
();
exit
(
0
);
}
# elsif ($opt eq 'x') { $x_flag= 1; }
elsif
(
$opt
eq
'
q
')
{
$quiet
=
1
;
}
else
{
usage
();
}
}
}
else
{
push
(
@PARS
,
$arg
);
}
}
my
%MSIZE
=
{};
my
%MSIZE
=
{};
my
$FC
=
new
FCAT
;
my
$FC
=
new
FCAT
;
...
@@ -181,10 +214,18 @@ print join (' ', '#', __LINE__, %$fc_m), "\n";
...
@@ -181,10 +214,18 @@ print join (' ', '#', __LINE__, %$fc_m), "\n";
my
$p
;
my
$p
;
foreach
$p
(
@x_paths
)
foreach
$p
(
@x_paths
)
{
unless
(
$quiet
)
{
{
print
"
rm '
$p
'
\n
";
print
"
rm '
$p
'
\n
";
print
"
ln '
$p1
' '
$p
'
\n
";
print
"
ln '
$p1
' '
$p
'
\n
";
}
}
if
(
$doit
)
{
system
('
rm
',
$p
);
system
('
ln
',
$p1
,
$p
);
}
}
}
}
$tsize
;
$tsize
;
}
}
...
...
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