Gitlab Community Edition Instance
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bnachtw
dsmci
Commits
7d084360
Commit
7d084360
authored
Dec 10, 2019
by
bnachtw
Browse files
changed form of path arrays to path
parent
89950867
Changes
1
Hide whitespace changes
Inline
Side-by-side
perl/dev-dsmci.pl
View file @
7d084360
...
...
@@ -56,6 +56,7 @@
# 2019-12-06 0.6.5.3 removed used sub "array_minus"
# 2019-12-06 0.6.6 changed form of path arrays to "path;SU-switch":
# removing @sund, @suyd, replaced by @allpaths
# 2019-12-10 0.6.6.1 add the number of threads to top of ".all.log" file
#
# important notes
#
...
...
@@ -384,6 +385,10 @@ $threads = 0; # reset number of child threads to zero
$numdir
=
(
scalar
@allpaths
);
$dircount
=
0
;
# counter of dirs already processed
# write number of threads to global logfile
open
$GLOBALLOGFILE
,
"
>>
",
$globallog_filename
;
printf
$GLOBALLOGFILE
"
Number of Threads: %d
\n\n
",
$numdir
;
close
$GLOBALLOGFILE
;
fork_backup_threads
(
\
@allpaths
);
# wait for all child threads exiting
...
...
@@ -702,6 +707,23 @@ sub in_array
}
return
FALSE
;
}
# look up if a given string is already stored in an array, where each array item consists of two parts seperated by ";"
sub
in_array1
{
my
(
$sstring
,
@array
)
=
@_
;
# input: string and array
my
$argi1
;
# first element of string given in array @array
foreach
my
$argi
(
@array
)
{
(
$argi1
,
undef
)
=
split
'
;
',
$argi
;
# devide array item in both parts
if
(
$argi1
eq
$sstring
)
# compare first part with given string
{
return
TRUE
;
}
}
return
FALSE
;
}
# collocate both loops in one subroutine
sub
fork_backup_threads
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment