Gitlab Community Edition Instance

Commit 7d084360 authored by bnachtw's avatar bnachtw
Browse files

changed form of path arrays to path

parent 89950867
......@@ -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
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment